You are not logged in.

#1 2007-05-31 15:42:19

SystemParadox
Member
From: Tavistock (Devon) and Bristol
Registered: 2006-06-09
Posts: 35
Website

Check if a file has been modified, list all modified files

Hello everyone.
In the pacman man page there is a section about how it decides what to do with files which have changed when upgrading a package. This implies that it knows when files have been modified (probably by md5 or something).

The thing is, this functionality seems to be hidden within pacman, and only used when it deals with packages.

What about backups? At the moment my backup system is something along the lines of:
Get the list of installed packages and put that somewhere safe.
Backup /home, /etc, and some of /var.
Should be pretty robust, but I have changed and added files elsewhere in my tree. If I had the disk space I would do what I had to do when running slackware- backup absolutely everything except /tmp /proc /sys and /dev, but that's an extra 6 gigs or so which should easily be able to be saved.

It would be very useful to ask pacman if a particular file has changed since it was installed (with possibly also an option to check against the latest repo as well), and also to ask pacman to search a particular tree (but given some exclusions- perhaps using find somehow), for all files which have changed.
If pacman could be asked to query one file I could use find, but that would have to call pacman once for every file, and I have a feeling that would make it take 50 times as long.

Anyone know a way of getting to this functionality with the current pacman?
Or do I have to wait for developers to implement it?
(If so, please could someone add this as a feature request).

Thanks
Simon

Offline

#2 2007-05-31 16:04:07

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Check if a file has been modified, list all modified files

I don't think pacman tracks changes for non-config files. The config files can be checked for changes by running pacman -Qii on the owning packages.

If you changed things elsewhere in the tree, you probably put them into NoUpdate in pacman.conf, right? Can't you use that list for this purpose?

Offline

#3 2007-05-31 16:15:00

SystemParadox
Member
From: Tavistock (Devon) and Bristol
Registered: 2006-06-09
Posts: 35
Website

Re: Check if a file has been modified, list all modified files

ataraxia wrote:

I don't think pacman tracks changes for non-config files. The config files can be checked for changes by running pacman -Qii on the owning packages.

If you changed things elsewhere in the tree, you probably put them into NoUpdate in pacman.conf, right? Can't you use that list for this purpose?

Thanks. Why isn't -Qii documented? (ilovecandy isn't documented either).

I'm pretty sure I've only modified config files actually I didn't realise they would be separated out. Though I don't remember specifying what is and isn't a config file anywhere in my own PKGBUILD's, so I'm probably going to have to go end make some changes to those.

"pacman -Qo `find`" should probably be enough for the rest of the files.

Thanks
Simon

Offline

#4 2007-05-31 16:30:45

SystemParadox
Member
From: Tavistock (Devon) and Bristol
Registered: 2006-06-09
Posts: 35
Website

Re: Check if a file has been modified, list all modified files

SystemParadox wrote:

"pacman -Qo `find`" should probably be enough for the rest of the files.

Ah, one small problem with that- pacman complains that the argument list is too long.

Which means I've got to do:
find -exec pacman -Qo {} \;

Offline

#5 2007-05-31 16:35:12

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Check if a file has been modified, list all modified files

The config files are set up in the "backup" array of the PKGBUILD. pacman's own PKGBUILD has a nice example.

Offline

Board footer

Powered by FluxBB