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

Re: Correct method for aborting package installation from maintainer scripts

On Sat, Feb 03, 2001 at 11:11:43PM -0500, Matt Zimmerman wrote:

> On Sat, Feb 03, 2001 at 11:05:05PM -0500, Matt Zimmerman wrote:
> > What is the best practice in this situation?  In the case where apt and
> > preconfiguration are being used, I could have the config script abort.  Is
> > that my only option?  What about users who don't use apt, or don't use
> > preconfiguration?
> I just realized that an abnormal exit from .config will not cause
> dpkg-preconfigure to fail.  What to do?

This is the only solution I've come up with so far:

Create a shared/upgrade-libfoo-to-version-blah template, include it in every
package that relies on the foo library, and have them all ask the question in
.config and check it in .preinst.  They will all have to Pre-Depend on debconf.
The installation run still breaks messily if other packages are being upgraded
at the same time.

I hate it.  At this point, I am considering just displaying a note advising the
user to interrupt the installation themselves, as there is no good way to do it
programmatically, and the user has a good chance of being able to send a
keyboard interrupt before dpkg actually unpacks everything.

 - mdz

Reply to: