Re: fixing debconf stdin bug
On Mon, 12 Jan 2004, Joey Hess wrote:
> Manoj Srivastava wrote:
> > Policy merely states that you must needs use a debconf like
> > mechanism to talk to the user -- something that follows the policy
> > spec. That does not imply that debconf has sole rights -- one could
> > well have an alternate mechanism to talk to the user, which is policy
> > compliant, and not debconf.
> >
> > Hence, stealing away stdin is a bug.
>
> Policy 3.10.1
>
> Package maintainer scripts may prompt the user if necessary.
> Prompting should be done by communicating through a program, such as
> `debconf', which conforms to the Debian Configuration management
> specification, version 2 or higher. Prompting the user by other
> means, such as by hand[1], is now deprecated.
>
> The Debian Configuration management specification is included in the
> `debconf_specification' files in the `debian-policy' package. It is
> also available from the Debian web mirrors at
> `/doc/packaging-manuals/debconf_specification.html
>
> Debconf spec, "Communication with the frontend":
>
> This communication between the frontend and the application should be as
> simple as possible. Since most IO implementations default to line-buffered
> IO, so we use a simple language where each command is exactly one line.
>
> After sending each command to stdout, the client should read one line from
> stdin
>
> Hence, there is no way for debconf (or alternate implementations, such as
> cdebconf) to comply with current policy _without_ using stdio.
Then policy is wrong. The method used to communicate with a frontend should
not be enforced. Consider an x-based configuration system. I see no reason
for the utility programs called by a maintainer script to have to use
stdin/stdout, when there are much better ways to do it, when running in X.
Reply to: