[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#25398: dpkg dies if /usr/local/bin is a symlink



Package: dpkg
Version: 1.4.0.23.2

This is a problem that I helped fix on the #debian irc channel, 
while we got the user up and going, it is probably something that
shouldn't happen.

If /usr/local/bin is a symlink like
lrwxrwxrwx   1 root     root           20 Aug  1 12:50 bin -> /usr/lib/oss/soundon

Then dpkg dies with "not a directory".
Like
dpkg (subprocess): failed to exec dpkg-split to see if it's part of a multiparter: Not a directory
dpkg: error processing apt_0.1.5.deb (--install):
subprocess dpkg-split returned error exit status 2
D000010: ensure_pathname_nonexisting `/var/lib/dpkg/reassemble.deb'
Errors were encountered while processing:
 apt_0.1.5.deb

This happens with dpkg-split (which is called by dpkg -i blah.deb)
and dpkg-deb -I blah.deb

An strace (grepping for directory) of dpkg-deb -I gives:
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/libc.so.6", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/libc.so.6", O_RDONLY)    = -1 ENOENT (No such file or directory)
stat("/tmp/00335aaa", 0xbffffbb0)       = -1 ENOENT (No such file or directory)
[pid   336] execve("/usr/local/sbin/rm", ["rm", "-rf", "/tmp/00335aaa"], [/* 16 vars */]) = -1 ENOENT (No such file or directory)
[pid   336] execve("/usr/local/bin/rm", ["rm", "-rf", "/tmp/00335aaa"], [/* 16 vars */]) = -1 ENOTDIR (Not a directory)

OK, so the problem looks like you do your execve, if it ENOENT you
keep going, but if it is ENOTDIR then you die.  I suspect this may
not be what you want to happen.

The user's path was
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

The quick fix was to cd /usr/local ; rm bin ; mkdir bin, that worked.

  - Craig

-- 
Craig Small VK2XLZ, PGP: AD 8D D8 63 6E BF C3 C7  47 41 B1 A2 1F 46 EC 90
|@work: csmall@scooter.o.i.net,            @play: vk2xlz@vk2xlz.ampr.org|
|@home: csmall@small.dropbear.id.au,           @debian:csmall@debian.org|
|@web: http://www.triode.net.au/~csmall             @spam:root@localhost| 


--  
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: