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

Bug#362885: x11-common: unable to upgrade, rmdir: /usr/X11R6/bin: Directory not empty



#include <hallo.h>
* Steve Langasek [Tue, Apr 18 2006, 01:41:08PM]:
> On Tue, Apr 18, 2006 at 12:14:25PM +0200, Eduard Bloch wrote:
> 
> > > If you move the files, dpkg may be unable to find them at package
> > > uninstallation, resulting in orphaned files on the filesystem; or there may
> > 
> > Not 100% correct. The problem of deinstallation is covered with the
> > symlink workaround since dpkg AFAICS follows the symlinks in the path
> > when removing a file.
> 
> Hmm, you're assuming that we don't, at some later date (post-etch), drop the
> /usr/X11R6/bin compat symlink.  If one of these packages is removed *after*
> that point, dpkg has no way to locate the binaries in order to remove them.

I do, because otherwise we would need to make sure that /etc/profile the
user machines has the new directory in $PATH, which is not the case (for
non-root users) yet. But forcing the transition is better than keeping
it forever.

> > > Forcing the user to deal with the conflict is the only safe way of handling
> > > files left in /usr/X11R6/bin.  It should probably be turned into a debconf
> > > note later on, but for the time being I think the current behavior is as
> > > good as it's going to get.
> > 
> > "safe" does not mean reliable or usefriendly.
> 
> As I'm using the word "safe", I do mean that it's reliable -- you reliably
> get one of two results, a successful upgrade or a message telling you that
> you need to reconcile by hand.

When it comes to the reliability of the upgrade process, I would
distuingish between the terms. Personally, one of the thing I hate are
failures in the middle of process which can have been avoided.

> > I still think that the current lone "rmdir" hidden in the postinst is not
> > sufficient. What we need is IMO a list of "dirty" files - files that have
> > existed in Debian in X11R6/bin directory before and which would certainly
> > be uninstalled by apt/dpkg during the upgrade. The debconf's config script
> > should be executed during dpkg-preconfigure (NOTE: not in the middle of
> > upgrade!), scan the existing /usr/X11R6/bin directory, substract the set
> > of "dirty" files and if there are still remaining files in the list, then
> > the user should be given a chance to abort the whole installation before
> > it starts. And a list of remaining files should be printed. Maybe together
> > with 3rd-party packages that those files may belong to.
> 
> > If you wish me to implement a such solution, please say "do it" and I
> > will try to.
> 
> If you do compile a list of files that you believe came from packages, what
> do you do with them if you find them still there when it's time to turn
> /usr/X11R6/bin into a symlink?

Then, and only then it should be allowed to stop/break, because the user
must have done nasty things in time between the moments of the
check/warning and the removal should take place (or an upgrade of his
3rd party packages, though unlikely).

I don't disagree with the current solution anymore. I just would like to
add pre-upgrade check&warning.

Eduard.



Reply to: