Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#25166 - Pacman cache cleaning should ignore source packages and package databases

Attached to Project: Pacman
Opened by Dan McGee (toofishes) - Tuesday, 19 July 2011, 03:00 GMT
Last edited by Allan McRae (Allan) - Monday, 19 March 2012, 19:57 GMT
Task Type Bug Report
Category Scripts & Tools
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.3
Due in Version 4.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Un-stupify cache cleaning interaction with source package files and package databases. We probably should just leave them alone.

We can detect source packages by looking at the archive extension, looking at the package contents for a one-level deep PKGBUILD file (and perhaps other 'shape' characteristics), or both.

Databases are of known desc/depends etc. construction.

$ sudo pacman -Sc
Password:
Cache directory: /var/cache/pacman/pkg/
Cache directory: /home/makepkg/packages/
Packages to keep:
All locally installed packages
All current sync database packages
Do you want to remove all other packages from cache? [Y/n] y
removing old packages from cache...
error: missing package metadata in /home/makepkg/packages/weka-3.7.3-1.src.tar.gz
File /home/makepkg/packages/weka-3.7.3-1.src.tar.gz does not seem to be a valid package, remove it? [Y/n] n
error: missing package metadata in /home/makepkg/packages/zzz.db
File /home/makepkg/packages/zzz.db does not seem to be a valid package, remove it? [Y/n] y
error: missing package metadata in /home/makepkg/packages/zzz.db.tar.gz.old
File /home/makepkg/packages/zzz.db.tar.gz.old does not seem to be a valid package, remove it? [Y/n] y
error: missing package metadata in /home/makepkg/packages/zzz.db.tar.gz
File /home/makepkg/packages/zzz.db.tar.gz does not seem to be a valid package, remove it? [Y/n] y
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 19 March 2012, 19:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  http://projects.archlinux.org/pacman.git /commit/?id=47d0df6c
Comment by Jakob Matthes (jakobm) - Tuesday, 19 July 2011, 10:20 GMT
Having an separate ext partition for the pacman package cache, pacman -Sc asks about the "lost+found" directory, too.
Is that considered as bad setup (on my part) or desired behavior of pacman -Sc?
Comment by Dan McGee (toofishes) - Tuesday, 19 July 2011, 10:41 GMT
No, that is a legit setup that we can probably accommodate.
Comment by Dan McGee (toofishes) - Thursday, 13 October 2011, 22:32 GMT
Easy pickings here for anyone that wants to work on a patch to get this fixed. Take a look at src/pacman/sync.c and notice how we already exempt signatures around line 220- we can probably do the same for "*.db", "*.db.tar*", "*.src.tar*", etc.

Loading...