Re: dpkg modification: non-interactivity
James LewisMoss writes:
> I think a `half-configured' state is a bad idea. Packages in their
> postinst should pick suitable defaults for anything important. They
> should then run something like "register-interactive-command foobar" in
> the postinst.
>
> Dpkg then runs a single script at the end of configuration that runs all
> the commands like foobar that were registered with the
> register-interactive-command. This requires a single change to dpkg to
> run the script at the end of configuration.
Agreed: this is a much better solution.
> The interactive commands should feel free to offer to change any of
> the defaulted values.
As they do today - the fact that *all* installation scripts get identified
this way is a good thing: I have sometimes had to uninstall/reinstall
because a package only permitted installation in postinst!
> Are there packages that can't default values like this (and would
> cause a broken system)?
I doubt it - the system would have to be *seriously* broken to not even
permit repetition of dpkg --configure --pending.
> This, as far as I can see, is the most minimal change to dpkg to allow
> for separating interactive scripts from the rest. The
> postinst-interactive idea seems a bit of overkill to me.
Agreed.
> Also a nice bonus is that once we start to get nice configuration tools
> (for console and X) this would blend easily in to using those for these
> interactive parts.
There is one issue here, though: the "install log"...I'm unsure about that.
- o -
Aaron Van Couwenberghe writes:
> If the 'standards version' on a package is old (pre-non-interactive
> stage) the package's postinst should automatically be considered
> interactive; it will be configured after all the more recent ones. An old
> standards-version should be considered a grave bug after this change.
This is much to rough, IMHO. It suffices to file bugs against packages
that *do* interaction in the postinst script because the others aren't
really in conflict!
> otherwise the postinst should make a special call such as
> "debian-register-interactive <package-name>-config.{sh,pl}" (yes, the name
> should be standardized), where <package-name>-config is linked to /usr/sbin
> (or /usr/X11R6/sbin) for future perusal, and registered as one of the
> interactive config utilities to use.
Agreed.
> Then, the next time dpkg --configure-interactive is run, everything
> that has been registered in the interactive queue is run. Of course, the
> non-interactive segment picks reasonable defaults, however broken that will
> leave the package in a non-idea situation.
I don't think that a special dpkg option is needed since the interactive
configuration is merely the last step of normal configuration. In fact the
users will think of the interactive configuration as *the* configuration.
Cheers,
Kristoffer
--
Kristoffer Høgsbro Rose, phd, prof.associé <http://www.ens-lyon.fr/~krisrose>
addr. LIP, Ecole Normale Supérieure de Lyon, 46 Allée d'Italie, F-69364 Lyon 7
phone +33(0)4 7272 8642, fax +33(0)4 7272 8080 <Kristoffer.Rose@ENS-Lyon.FR>
pgp f-p: A4D3 5BD7 3EC5 7CA2 924E D21D 126B B8E0 <krisrose@{debian,tug}.org>
Reply to: