[Frugalware-devel] Pacman fsck
vmiklos at frugalware.org
Sun May 1 23:12:51 CEST 2011
On Sun, May 01, 2011 at 03:04:03PM +0200, Lord Fener <lorddarthfener at gmail.com> wrote:
> I made a patch for pacman to add the option to check if the files of a
> package are still were they should be,
> the option is -Qf (or --fsck) and seems to work fine, but if I launch it on
> the whole database it uses about 300Mb of Ram, is it possible that is all
> cache? (if I type a echo 2 > /proc/sys/vm/drop_caches the used ram is
Yes, I think so. Not sure how many packags you have installed, when I
run 'pacman -Qf' the second time with your patch, it completes in about
3 seconds and uses 30 MB of ram, that's quite acceptable, I think.
[ You could use pacman_pkg_free() after checking a given package, but
currently libpacman will not empty the cache for internal packages, so
it does not do anything, unless you run pacman -Ql -p <foo.fpm> and you
want to free the pointer of that package. ]
> Suggestions are welcome.
I think it's fine, I pushed it.
The only correction I did is to respect the -r option, by using
config->root instead of "/". This was a bug in -Ql as well, I guess you
hit that bad example. ;)
One remaining task: could you please update doc/pacman-g2.txt to
describe your new option?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the Frugalware-devel