On Thu, 2010-06-03 at 09:34 -0700, Russ Allbery wrote: > The previous discussion on this bug didn't reach a final consensus on > wording, but I still believe we have a consensus that this is the right > general direction. Here's an updated patch that includes the permission > suggested by Steve Langasek for maintainer scripts to abort for > high-priority questions without a reasonable default, but with a caution > against setting up that situation. > > I'm looking for seconds or further discussion if people don't believe that > this is the right direction to go. > > diff --git a/policy.sgml b/policy.sgml > index af00c0e..3f6b82d 100644 > --- a/policy.sgml > +++ b/policy.sgml > @@ -3557,15 +3557,26 @@ Files: > <heading>Controlling terminal for maintainer scripts</heading> > > <p> > - The maintainer scripts are guaranteed to run with a > - controlling terminal and can interact with the user. > - Because these scripts may be executed with standard output > - redirected into a pipe for logging purposes, Perl scripts > - should set unbuffered output by setting <tt>$|=1</tt> so > - that the output is printed immediately rather than being > - buffered. > + Maintainer scripts are not guaranteed to run with a controlling > + terminal and may not be able to interact with the user. They > + must be able to fall back to noninteractive behavior if no > + controlling terminal is available. Maintainer scripts that > + prompt via a program conforming to the Debian Configuration > + Management Specification (see <ref id="maintscriptprompt">) may > + assume that program will handle falling back to noninteractive > + behavior. > + </p> > + > + <p> > + For high-priority prompts without a reasonable default answer, > + maintainer scripts may abort if there is no controlling > + terminal. However, this situation should be avoided if at all > + possible, since it prevents automated or unattended installs. > + In most cases, users will consider this to be a bug in the > + package. > </p> > </sect> > + > <sect id="exitstatus"> > <heading>Exit status</heading> > > @@ -9537,9 +9548,9 @@ END-INFO-DIR-ENTRY > </p> > > <p> > - The maintainer scripts are guaranteed to run with a > - controlling terminal and can interact with the user. > - See <ref id="controllingterminal">. > + The maintainer scripts are not guaranteed to run with a > + controlling terminal and may not be able to interact with > + the user. See <ref id="controllingterminal">. > </p> > </item>
Seconded. This is definitely in the right direction and I think the wording has enough of an escape clause in it, but with just the right amount of deterrent. Cheers, Andrew. -- ------------------------------------------------------------------------ andrew (AT) morphoss (DOT) com +64(272)DEBIAN Fine day for friends. So-so day for you. ------------------------------------------------------------------------
signature.asc
Description: This is a digitally signed message part