Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#13877 - Verify option for local packages (aka system check)

Attached to Project: Pacman
Opened by changaco (changaco) - Thursday, 19 March 2009, 16:23 GMT
Last edited by Dan McGee (toofishes) - Thursday, 23 July 2009, 02:39 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To Xavier (shining)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version 3.3.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Some time ago I accidentally deleted some important files of my system and I wanted to know which packages they were from in order to re-install only those packages. This is not currently possible in pacman so I first wrote a bash script to do so and now I've implemented the feature in pacman so I send you the code I wrote for that.

It's not really pretty and it doesn't work if you specify which packages to check (get a segmentation error I can't figure out). As I'm not really an expert in C/C++ I just give you the code and if you're interested I'm sure you'll debug it in some minutes.
This task depends upon

Closed by  Dan McGee (toofishes)
Thursday, 23 July 2009, 02:39 GMT
Reason for closing:  Implemented
Additional comments about closing:  Added in commit ca6ef852f9944ad31e8a136f7faf71da2c5fb57f
Comment by Dan McGee (toofishes) - Monday, 23 March 2009, 22:29 GMT
Can you please submit this as a unified diff in one file? "diff -ur" is the command you are looking for.
Comment by changaco (changaco) - Tuesday, 24 March 2009, 20:10 GMT
what about a "git diff" ?
   patch (4.8 KiB)
Comment by Dan McGee (toofishes) - Wednesday, 25 March 2009, 01:51 GMT
A git diff is great- even better would be taking a glance at the submitting-patches file in the top level of the repository and following the directions there, which do need some minor updating now that I am looking. Another good place to look might be the
Comment by changaco (changaco) - Wednesday, 25 March 2009, 08:22 GMT
OK I'm gonna do some reading whenever I get the time. :)
Comment by changaco (changaco) - Saturday, 28 March 2009, 14:00 GMT
I read the guide and the submitting-patches file. I just sent the patch to the mailing list. Thanks for your help.
Comment by Ivan Yurasov (vanDake) - Monday, 30 March 2009, 07:47 GMT
May be possible use of external program like this
Comment by Dan McGee (toofishes) - Saturday, 06 June 2009, 17:53 GMT
Are  FS#11091  and  FS#13877  dupes?
Comment by changaco (changaco) - Saturday, 06 June 2009, 18:05 GMT
 FS#11091  is much more complex, the poster wants a check on "the size, MD5 sum, permissions, type, owner and group of each file". If I am not mistaken, libalpm does not store all of this, so it is harder to implement and I guess it would have consequences on libalpm's performance. My patch just checks if the file is on the file system (ie not deleted by mistake or failure).