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. Nope, at least not in the current implementation of dpkg; see <http://www.marga.com.ar/blog/index.cgi/debian/New_Diagrams.html>, <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=372148>. The problems you've described definitely *do* come from the postinst of the old version of the package, though both policy and Marga's maintainer script diagrams document that it would be the postinst of the new version that gets called. I don't know whether the documentation or the dpkg implementation is buggy -- I assume it's the documentation, since this error condition happens before the new package is even unpacked -- but either way, this isn't in this case something that can be fixed immediately by changes to the x11-common postinst. As I discussed with David on IRC when this bug first came in, the most straightforward fix is for x11-common to do its /usr/X11R6/bin checks *first*, so that there are no changes to the other symlinks that need to be rolled back in case of failure. That of course doesn't avoid the matter of /usr/X11R6/bin having to be removed and turned to a symlink, which you're certainly not the only user to object to. I'd be grateful if you were able to come up with a better solution, given that third-party software that *references* files no longer in /usr/X11R6/bin is also a concern. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/
signature.asc
Description: Digital signature