summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/server.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-09-26 05:07:36 +0200
committerDan McGee <dan@archlinux.org>2007-09-28 07:16:43 +0200
commit16cb8e6e61c542731814192fc03e3988c7a26325 (patch)
tree130921d619bba25c07d37b00799b2ba3738a2d47 /lib/libalpm/server.c
parentf7bbfe4052ca1060d2d1021dacd77923d8ab6786 (diff)
downloadpacman-16cb8e6e61c542731814192fc03e3988c7a26325.tar.gz
pacman-16cb8e6e61c542731814192fc03e3988c7a26325.tar.xz
Reimplement pacman cache cleaning the right way
Partial cache cleaning was eliminated in a previous commit because it relied on package naming conventions. Re-add it the correct way- we actually open up each package in the cache and get a name and version out of it. If the name and version match that of an installed package, keep it. If the package is not installed or the version does not match the locally-installed version, get rid of it. This can easily be modified if some other heuristic of keeping and removing packages is desired, or if we should clean out the cache dir of any files that are not packages, etc. The biggest current problem with this new approach- speed. Here is one run on my local machine, going from 1643 to 729 packages in the cache (753 in the local DB): real 4m25.829s user 3m22.527s sys 0m6.713s This is likely best addressed by the package loading scheme, which may be loading the entirety of each package archive, which is a waste when we only need the .PKGINFO file read. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/server.c')
0 files changed, 0 insertions, 0 deletions