You are not logged in.
Background info
I have the following partitions on my desktop:
/
/boot
/home
/opt
/usr
/usr/local
/var
/var/local
Now, I normally have /, /home and /var mounted read-write and /boot, /opt, /usr, /usr/local and /var/local mounted read-only (if I crash the box, it reduces the potential for data corruption). I have a script that I manually call to mount the read-only partitions read-write, and return then to read-only again (called remountsys). If I want to install/remove/upgrade/etc packages, I run remountsys to set partitions read-write, then pacman, then remountsys to set partitions read-only.
The problem
If I forget (through my own stupidity) to remount the partitions read-write and run, say "pacman -Rs mplayer", obviously it cannot remove mplayer and churns out lots of "read only filesystem" errors, as it should. However, it still removes mplayer from /var/lib/pacman/local, so pacman no longer things mplayer is installed, but the files are still on the system. Another "pacman -Rs mplayer" obviously doesn't do anything because it doesn't think it's installed, and trying to reinstall mplayer doesn't work because of conflicting files. I tried a "pacman -Sf", but it does not always work (I can't remember the specifics, but I believe it failed when symlinks were involved). I basically have to manually remove any files left on the system, which can be a real pest.
My thoughts
Shouldn't pacman have error checking, basically to make sure that the package was uninstalled before it removes it from /var/lib/pacman/local? Does this count as a bug, and thus belong in the bug tracker? I realise this can all be solved by me not being quite so forgetful (or paranoid about my data), but I still consider this to be a flaw in pacman.
Disclaimer: mplayer is just an example that sprang to mind because I'm using it just now. This applies to all packages.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB
Offline
However, it still removes mplayer from /var/lib/pacman/local, so pacman no longer things mplayer is installed, but the files are still on the system.
I don't think this qualifies as a bug, simply because it's already a pacman feature:
usage: pacman {-R --remove} [options] <package>
options:
<snip>
-k, --dbonly only remove database entry, do not remove files
Offhand, I can't think of a situation where I would use it, but presmably it's there for a reason.
Shouldn't pacman have error checking, basically to make sure that the package was uninstalled before it removes it from /var/lib/pacman/local?
Sounds reasonable - unless, of course, the -k flag above is used. Post a feature request.
Offline
Cheers tomk, feature request posted: http://bugs.archlinux.org/task/5887
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB
Offline