Package: dpkg
Version: 1.13.10
I stumbled across a bug in dpkg where symlinks can be misapplied in some
cases. The bug is only visible at rare times, which I've only
encountered twice so far during the changing directory structure of the
Xorg packages while trying to track the pre-release development of the
Breezy distribution of the Ubuntu debian-based Linux distribution.
The problem seems to be that symlinks are created somehow as the
appropriate ln -s command would create them, with no checks. In my most
recent example, this caused /usr/bin/X11/bin to link to /usr/bin;
apparently the idea was to have /usr/bin/X11 link to /usr/bin, but
/usr/bin/X11 was a pre-existing directory. This makes sense if you
consider the behavior of "ln -s /usr/bin /usr/bin/X11".
The previous problem I encountered had /usr/X11R6/bin/Xorg linked to
../../X11R6/Xorg. Reinstalling the package didn't help, nor did
upgrading; but reinstalling the entire distribution and then upgrading
fixed the problem, even with the alternate installation (separate
partition) still repeting the problem. This left me confused at the
time; but with the recent issue, this behavior now leads me to conclude
that the package manager is not properly installing symlinks.
The package manager MUST understand what it's doing with packages. It
must know where files go and where to put them. As a particular
example, Gentoo's package manager Portage isolates the building and
configuring of a package utilizing a sandboxing library; for Debian and
dpkg, the build process is on a server, and the preinstallation duties
could and probably should occur in a sandboxed path in /var/tmp.
Installing the result to / should occur after a strict test for file
name collisions; directories in the sandbox may exist in the target
installation root as directories or symlinks, while directories in the
target installation root may only collide with directories in the
sandbox. Removing a package removes any directories in the package that
still exist but are empty; otherwise they are left where they are.
Any other changes made by the preinstall and postinstall scripts should
be tracked and removable by the package manager, as related to Ubuntu
bug #11692 which most likely affects Debian as well. The details of
that bug should really be filed separately, but the issue and solution
are pretty much the same.
--
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.
Creative brains are a valuable, limited resource. They shouldn't be
wasted on re-inventing the wheel when there are so many fascinating
new problems waiting out there.
-- Eric Steven Raymond
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]