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

Bug#371874: x11-common postinst error: trouble with /usr/include/X11



On Sun, Jun 11, 2006 at 10:30:21PM -0400, Joey Hess wrote:
> David Nusinow wrote:
> > Ok, this is an extremely troubling bug. The previous x11-common's postinst
> > gets called when the new x11-common's postinst fails with the /usr/bin/X11
> > switch.
> 
> No the problem is not that the new postinst is failing (nor does dpkg do
> any error-unwind involving the old postinst if the new one fails).
> The postinst is called to error-unwind if prerm or preinst fails, and
> apparently (though policy doesn't seem to document this) when unpacking
> fails due to a file conflict, as happens here:
> 
> Unpacking replacement x11-common ...
> dpkg: error processing /var/cache/apt/archives/x11-common_1%3a7.0.20_arm.deb (--unpack):
>  trying to overwrite `/usr/X11R6/bin', which is also in package xcalibrate
> x11-common postinst warning: /usr/include/X11 symbolic link does not exist
> 
> I could be wrong but I think that in an error-unwind situation
> dpkg always runs the new package's postinst[1]. Which makes fixing this
> kind of bug easier.
> 
> Also, if it's helpful I can reproduce this at will. Unfortunatly the
> image I have that can reproduce it is arm. :-)

Ok, vorlon managed to pinpoint the bug. I'm on crack. So the preinst was
removing the include, share, and lib symlinks during preinst. After that,
it was doing the bin removal, which failed in your case. On unwind, the
lib, include, and share symlinks were still gone causing the problems.
We've moved the bin transition to being the first thing in the preinst, so
we fail early, prior to messing with anything else. This should solve the
problem. I'll be uploading this to unstable in a few minutes. Thank you for
the help!

 - David Nusinow



Reply to: