Re: policy changes toward Non-Interactive installation
Anthony Towns wrote:
> > > X...........Y 1) Ask to remove /System.map files
> > > .X Y 2) ask to prepare a boot floppy
> > > XXX.........Y 3) ask which floppy drive to use
> > > .XX.........? 4) do I need to format the floppy?
> > > .XXX........N 5) Insert floppy, hit return
> > > .XXX........N 6) failure, retry?
> > > .XXX........N 7) failure, you have formatted floppy?
> > > .XXX........N 8) you have floppy, hit return when ready
> > > .XXX........N 9) Failure writing floppy, retry?
> > > .XXX........N 10) failure, hit return when youhave new floppy
> > > XX..........Y 11) if conf exists ask if we should run $loader with old config
> > > XXX.........Y 12) Or else ask if a new $loader config
> > > .XX.........Y 13) Or else ask if loader needed at all
> > > .XX.........N 14) Install boot vlock on partition detected at runtime
> > > XXXX........N 15) Install mbr root disk
> > > .XXX........N 16) Failure writing mbr, do this manually, hit return
> > > .XX.........N 17) make that partition active?
> You'd be at least half right.
> To clarify a little: I want to be able to answer the questions up front,
> do the install and have it work. If I've made a mistake (like not put a
> file where I said I did maybe), I don't mind if it dies and leaves that
> package to be configured later or something. I don't want it to pause
> and leave the rest of the system unconfigured, though.
Right, and I think that's what Manoj is illistrating above. His Y's and
N's seem to mostly make sense.
> ...failure cases, which I want to address as late as possible, rather
> than as soon as possible. (The realplayer question is mainly a failure
> question too, iirc)
Yes, iirc it was (it's gone now, I think I was able to move the failure
check robustly up to the config script).
> Basically, I'd like to be able to insist that I'm *never* asked a question
> as part of a postinst. I'd rather the postinst fail (and I'd rather Apt/Dpkg
> just get on with installing everything else, although it probably won't at
> the moment) than get asked a question.
That's do-able. Once debconf knows to run postinsts in full
noninteractive mode, critical questions that are thus not asked at all,
and which do not have their return code caught, will simply cause the
postinst to terminate with a nonzero return code.
(I think this is better than making _all_ questions terminate it, which is
not doable anyway, and also because if a postinst asks a priority low
question, say, then that is by definition a question that the
noninteractive mode can supply a reasonable answer to.)
I'll be happy to implement a debconf/non-interactive-foo (should apply
to all maintainer scripts save config, not just postinst, so I need a
better name), if people think it will be generally useful.
However, I presonally feel your specific case of the floppy prompting
would be better served by:
a) Making the question of low priority.
b) Making the question be asked only once, and this value used by all
future kernel packges you install. Or adding a question, "do you ever
want to make a boot floppy?"
see shy jo