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
Opened by changaco (changaco) - Thursday, 19 March 2009, 16:23 GMT
Last edited by Dan McGee (toofishes) - Thursday, 23 July 2009, 02:39 GMT
|
Details
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
Thursday, 23 July 2009, 02:39 GMT
Reason for closing: Implemented
Additional comments about closing: Added in commit ca6ef852f9944ad31e8a136f7faf71da2c5fb57f
http://showmecode.com/code/480/
FS#11091andFS#13877dupes?FS#11091is 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).