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

Re: quitting from install scripts



On Fri, Feb 23, 2001 at 12:24:43AM +1100, Drew Parsons wrote:
> > I'm planning to have mirrormagic use debconf to ask the user if they
> > want to delete the highscore files from the older version (which are
> > incompatible from the new).
> >
> > Having a choice of Yes/No is clear, but it seemed to me it might be
> > appropriate to provide a third alternative, "Quit", which aborts the
> > upgrade of mirrormagic.
> >
> > What is the usual approach to handling the aborting of a package
> > installation?  Is it appropriate to "exit 1" in preinst if the user
> > chooses "Quit", halting the installation of the package?

there's one package in particular that i think needs this: the
realplayer installer.

it won't let you do anything until you've downloaded the rp binary and
told debconf where it is. given the hoops you have to jump through and
nosy spam-trap questions you have to give false answers to in order to
actually download the binary this is a real PITA to have to do while
you're upgrading your system - especially when you're just doing a
dist-upgrade and you don't actually care whether rp gets upgraded or not
because you only use realplayer once or twice per year.

there needs to be an "i'll install it later" aka "quit" option.

a /usr/sbin/update-realplayer script which implemented the "later"
option would be useful. it would be even more useful if it could
actually fetch the binary itself.

so the answer to your question is: yes, sometimes it is appropriate to
have a quit option. in some cases, the exit code should indicate an
error (e.g. abort upgrade from ssh-nonfree to ssh). in other cases, it
should not (e.g. realplayer installer).

craig

--
craig sanders <cas@taz.net.au>

      GnuPG Key: 1024D/CD5626F0 
Key fingerprint: 9674 7EE2 4AC6 F5EF 3C57  52C3 EC32 6810 CD56 26F0



Reply to: