[Frugalware-devel] Pacman fsck
Miklos Vajna
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
> released)
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?
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: </pipermail/attachments/20110501/b0e66320/attachment.asc>
More information about the Frugalware-devel
mailing list