On Thu, 2009-03-19 at 13:59 -0700, Steve Langasek wrote: > On Fri, Mar 20, 2009 at 09:13:19AM +1300, Andrew McMillan wrote: > > On Thu, 2009-03-19 at 10:55 -0700, Russ Allbery wrote: > > > > Packages that are essential or that are dependencies of essential > > > packages may fall back on another prompting method if no such > > > interface is available when they are executed. > > > Since we're essentially saying that all packages must support debconf, > > why bother restricting the set of packages which are allowed to provide > > a fallback? > > Because the fallback is a "worst case" scenario, because testing for files > on the filesystem is a poor proxy for determining whether the interface is > in a usable state, and because adding the fallback code means duplicating > logic in your maintainer script and making it way more complex than it needs > to be. The fallback should only be permitted in Essential packages where it > has to be there in order to avoid unbreakable loops; in all other cases, > maintainers should properly declare their need for debconf and avoid making > their maintainer scripts more clever and less robust. > > This also ensures that (assuming the maintainer is following policy) uses of > debconf in preinsts are publically vetted by debian-devel before hitting the > archive.
OK, those are excellent reasons. Here's an updated patch to apply the following wording: Package maintainer scripts may prompt the user if necessary. Prompting must be done by communicating through a program, such as debconf, which conforms to the Debian Configuration Management Specification, version 2 or higher. Packages which are essential, or which are dependencies of essential packages, may fall back on another prompting method if no such interface is available when they are executed. Cheers, Andrew. ------------------------------------------------------------------------ andrew (AT) morphoss (DOT) com +64(272)DEBIAN Flexibility is overrated. Constraints are liberating. ------------------------------------------------------------------------
diff --git a/policy.sgml b/policy.sgml index df586d1..8f02c12 100644 --- a/policy.sgml +++ b/policy.sgml @@ -1218,17 +1218,16 @@ <heading>Prompting in maintainer scripts</heading> <p> Package maintainer scripts may prompt the user if - necessary. Prompting should be done by communicating + necessary. Prompting must be done by communicating through a program, such as <prgn>debconf</prgn>, which conforms to the Debian Configuration Management - Specification, version 2 or higher. Prompting the user by - other means, such as by hand<footnote> - From the Jargon file: by hand 2. By extension, - writing code which does something in an explicit or - low-level way for which a presupplied library - (<em>debconf, in this instance</em>) routine ought - to have been available. - </footnote>, is now deprecated. + Specification, version 2 or higher. + </p> + + <p> + Packages which are essential, or which are dependencies of + essential packages, may fall back on another prompting method + if no such interface is available when they are executed. </p> <p>