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#12778 - [pacman 3.2.2-1] pacman-optimize fails with pacman-cage

Attached to Project: Pacman
Opened by solsTiCe (zebul666) - Tuesday, 13 January 2009, 14:54 GMT
Last edited by Dan McGee (toofishes) - Sunday, 04 October 2009, 14:12 GMT
Task Type Bug Report
Category Scripts & Tools
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 3.2.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
when i try to run pacman-optimize while pacman-cage is running, pacman-optimize fail with this error

==> MD5sum'ing the old database...
==> Tar'ing up /var/lib/pacman...
==> Making and MD5sum'ing the new database...
==> Syncing database to disk...
==> Checking integrity...
==> Rotating database into place...
mv: cannot move `/var/lib/pacman' to `/var/lib/pacman.old': Device or resource busy
chmod: failed to get attributes of `/var/lib/pacman.old': No such file or directory
chown: failed to get attributes of `/var/lib/pacman.old': No such file or directory
==> ERROR: New database substitution failed. Check for /var/lib/pacman,
/var/lib/pacman.old, and /var/lib/pacman.new directories.

Steps to Reproduce:
use pacman-cage
and then pacman-optimize.

it was working nice with previous version of pacman.

if i uncage pacman db (with pacman-uncage), pacman-optimize work again.

i know that pacman-cage is not even available on aur so it is not supported _at ALL_ i use the version from http://repo.archlinux.fr/i686/pacman-cage/
but may be that bug might worth to look into.

still no 3.2.2 version of pacman in here ? at the left
This task depends upon

Closed by  Dan McGee (toofishes)
Sunday, 04 October 2009, 14:12 GMT
Reason for closing:  Won't fix
Additional comments about closing:  See comments. Thanks for doing some bug day sweeping of these.
Comment by Allan McRae (Allan) - Tuesday, 13 January 2009, 16:24 GMT
pacman-cage is in pactools in the AUR (http://aur.archlinux.org/packages.php?ID=5907). Here is the script: http://aur.archlinux.org/packages/pactools/pactools/pt-pacman-cage

I don't understand why you would want to use both. pacman-optimize tries to move all the files into a contiguous block on your hard drive. With pacman-cage, they are already in a loopbacked filesystem in a small contiguous file.

The reason this is failing is that we are trying to move the mount point that pacman-cage creates. I guess changing:

mv "$dbroot" "$dbroot.old" || fail=1
mv "$dbroot.new" "$dbroot" || fail=1

to

mv "$dbroot/*" "$dbroot.old" || fail=1
mv "$dbroot.new/*" "$dbroot" || fail=1

and cleaning up the left over $dbroot.new later would fix this but it seems pointless.
Comment by Dan McGee (toofishes) - Tuesday, 13 January 2009, 16:29 GMT
Not only pointless but also turns an atomic move operation (changing the name of a given inode) into multiple filesystem operations.
Comment by solsTiCe (zebul666) - Tuesday, 13 January 2009, 17:03 GMT
> "I don't understand why you would want to use both"

yes. i did not thought about that. but now that you mention it, i realise that's almost stupid.

i began to use pacman-cage once and continue to use pacman-optimizse as before. but i can see some difference after a pacman-optimise even with pacman-cage.

i think i'll stop to use one of them.

Comment by Dan McGee (toofishes) - Wednesday, 14 January 2009, 02:17 GMT
If you want to propose a patch that would check to ensure the mv command would succeed, I think that would be warranted, but otherwise I'm with Xavier here- it doesn't make sense to try two different tricks to speed up pacman.

Loading...