[pacman-dev] dangerous symlink handling with --root option
Mister Dobalina
reebydobalina at yahoo.ca
Mon Aug 20 22:38:26 EDT 2007
Hi again,
(and sorry again for any split lines)
Okay, so I was fooling around with the --root option
again, and after I realized from one of Xavier's posts
that pre/post install scriptlets won't be run at all
until /bin/sh (from bash) is installed, I figured I
should install the packages twice. This led to two
issues. I have a bash script (attached) that basically
does:
pkglist=( ... bunch o' base packages ... )
mkdir /tmp/pacman.test
pacman -U --root /tmp/pacman.test ${pkglist[*]}
pacman -U --root /tmp/pacman.test ${pkglist[*]}
The second install of coreutils causes:
error: cannot remove file
'/tmp/pacman.test/usr/bin/sleep': Read-only file
system
error: failed to commit transaction (transaction
aborted)
error: failed to release transaction (could not commit
transaction)
First Issue: CPU usage then goes to 100%, so I assume
that pacman has gone into an infinite loop somewhere.
Second Issue: the real concern is the "Read-only file
system" error, since /tmp is on a tmpfs and is
definitely not read-only. My / partition is read-only
though, and
# ls -l /tmp/pacman.test/usr/bin/sleep
lrwxrwxrwx 1 root root 10 2007-08-16 16:13
/tmp/pacman.test/usr/bin/sleep -> /bin/sleep
So pacman was following the absolute symlink *out* of
the --root and trying to remove /bin/sleep from my
main arch install ??
Cheers,
Jeremy
Get news delivered with the All new Yahoo! Mail. Enjoy RSS feeds right on your Mail page. Start today at http://mrd.mail.yahoo.com/try_beta?.intl=ca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chroot.symlink.test.sh
Type: application/x-sh
Size: 508 bytes
Desc: 1478927125-chroot.symlink.test.sh
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20070820/183c8712/attachment.sh>
More information about the pacman-dev
mailing list