Debian bug report logs - #617
prerm script doesn't have default response to prompt

Package: xbaseR6; Reported by: rdr@legislate.com (Raul Miller); 92 days old.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Thu Mar 23 06:06:28 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rrnWt-00062HC; Thu, 23 Mar 95 06:06 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA23088
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Thu, 23 Mar 1995 06:06:17 -0800
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #30) id m0rrnL9-000BzrC; Thu, 23 Mar 95 13:54 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rrljE-0002gOZ; Thu, 23 Mar 95 12:11 GMT
Message-Id: <m0rrljE-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Thu, 23 Mar 95 12:11 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
Subject: Re: Bug#617: prerm script doesn't have default response to prompt
In-Reply-To: <9503221432.AA23154@bb29c.mdd.comm.mot.com>
References: <9503221432.AA23154@bb29c.mdd.comm.mot.com>

Bill Mitchell writes:
> I'm inclined to agree with Ian here that the script shouldn't loop
> (and some of my postinst scripts may loop in this situation -- I'd need
> to check them to be sure).
> 
> However, saying "this is a bug" at this point may be a bit strong. Do
> the packaging guidelines which maintainers have used to write these scripts
> require scripts to exit with non-zero return values if presented with EOF
> in response to a prompt?

The packaging guidelines require a script to give a non-zero exit
status if *ANY* error occurs which means that the processing should
not continue.

EOF on stdin is merely a special case of this (unless the script can
do without the response, I suppose).

In fact, postinst scripts are simply a more general case of programs -
all of which should reflect errors in their exit status.  This is
vitally important, despite the fact that many of the original Unix
programs are braindead in this respect.  If programs don't give
correct error indications it is impossible to build a reliable system.

Furthermore, a program which goes into a tight loop when its stdin
goes away is clearly broken.  The HP system at the Engineering
Department here is full of such programs - I suspect a bug in the libc
- and they eat up huge amounts of CPU time to no good effect.

> Once the dust from the release settles, we probably need a second pass
> at the Guidelines, followed by review of the packages for Guidelines
> compliance.

This is not a Guidelines issue.  This is a programming quality issue.
NB, I'm tarring myself with the same brush here - many of my scripts
don't check for errors and will loop indefinitely.  I'll issue new
versions of the affected packages.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#617; Package xbaseR6; Resent-Message-ID: <debian-bugs-handler.617.032314075615157@pixar.com>. Full text available.

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Wed Mar 22 06:34:33 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rrRUV-0005I6C; Wed, 22 Mar 95 06:34 PST
Received: from motgate.mot.com by pixar.com with SMTP id AA12359
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Wed, 22 Mar 1995 06:34:27 -0800
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id IAA08809; Wed, 22 Mar 1995 08:33:08 -0600
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id IAA10731; Wed, 22 Mar 1995 08:33:03 -0600
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA23108; Wed, 22 Mar 95 06:33:02 PST
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA23154; Wed, 22 Mar 95 06:32:55 PST
Date: Wed, 22 Mar 95 06:32:55 PST
From: mitchell@mdd.comm.mot.com (Bill Mitchell)
Message-Id: <9503221432.AA23154@bb29c.mdd.comm.mot.com>
To: debian-bugs@pixar.com, iwj10@cus.cam.ac.uk
Subject: Re: Bug#617: prerm script doesn't have default response to prompt

iwj10@cus.cam.ac.uk (Ian Jackson) said

> Raul Miller writes ("Bug#617: prerm script doesn't have default response to prompt"):
> > Package: xbaseR6
> >
> > If someone does
> > .... | xargs dpkg -i
> 
> They shouldn't do that.  dpkg and the programs it runs sometimes need
> to prompt, and it's not reasonable to ask that there always be a
> default action.
> 
> However ...
> 
> > and the script loops without a default response, the script invoked by
> > dpkg will fall into an infinite loop.  (reading on end-of-file).
> 
> ... this is a bug.  In such circumstances the postinst should exit
> with a non-zero return code, so that dpkg will know that the
> configuration failed.

I'm inclined to agree with Ian here that the script shouldn't loop
(and some of my postinst scripts may loop in this situation -- I'd need
to check them to be sure).

However, saying "this is a bug" at this point may be a bit strong. Do
the packaging guidelines which maintainers have used to write these scripts
require scripts to exit with non-zero return values if presented with EOF
in response to a prompt?

Once the dust from the release settles, we probably need a second pass
at the Guidelines, followed by review of the packages for Guidelines
compliance.

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: mitchell@mdd.comm.mot.com (Bill Mitchell)
Subject: Bug#617: Info received (was Bug#617: prerm script doesn't have default response to prompt)
In-Reply-To: <9503221432.AA23154@bb29c.mdd.comm.mot.com>
References: <9503221432.AA23154@bb29c.mdd.comm.mot.com>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#617" or "Re: Bug#617" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#617: prerm script doesn't have default response to prompt
Reply-To: mitchell@mdd.comm.mot.com (Bill Mitchell), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: mitchell@mdd.comm.mot.com (Bill Mitchell)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Wed, 22 Mar 1995 14:48:02 GMT
Resent-Message-ID: <debian-bugs-handler.617.032214355815936@pixar.com>
X-Debian-PR-Package: xbaseR6
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Wed, 22 Mar 1995 14:48:02 GMT
Received: with rfc822 via encapsulated-mail id 032214355815936;
          Wed, 22 Mar 1995 14:35:59 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rrRUV-0005I6C; Wed, 22 Mar 95 06:34 PST
Received: from motgate.mot.com by pixar.com with SMTP id AA12359
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Wed, 22 Mar 1995 06:34:27 -0800
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id IAA08809; Wed, 22 Mar 1995 08:33:08 -0600
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id IAA10731; Wed, 22 Mar 1995 08:33:03 -0600
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA23108; Wed, 22 Mar 95 06:33:02 PST
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA23154; Wed, 22 Mar 95 06:32:55 PST
Date: Wed, 22 Mar 95 06:32:55 PST
From: mitchell@mdd.comm.mot.com (Bill Mitchell)
Message-Id: <9503221432.AA23154@bb29c.mdd.comm.mot.com>
To: debian-bugs@pixar.com, iwj10@cus.cam.ac.uk

iwj10@cus.cam.ac.uk (Ian Jackson) said

> Raul Miller writes ("Bug#617: prerm script doesn't have default response to prompt"):
> > Package: xbaseR6
> >
> > If someone does
> > .... | xargs dpkg -i
>
> They shouldn't do that.  dpkg and the programs it runs sometimes need
> to prompt, and it's not reasonable to ask that there always be a
> default action.
>
> However ...
>
> > and the script loops without a default response, the script invoked by
> > dpkg will fall into an infinite loop.  (reading on end-of-file).
>
> ... this is a bug.  In such circumstances the postinst should exit
> with a non-zero return code, so that dpkg will know that the
> configuration failed.

I'm inclined to agree with Ian here that the script shouldn't loop
(and some of my postinst scripts may loop in this situation -- I'd need
to check them to be sure).

However, saying "this is a bug" at this point may be a bit strong. Do
the packaging guidelines which maintainers have used to write these scripts
require scripts to exit with non-zero return values if presented with EOF
in response to a prompt?

Once the dust from the release settles, we probably need a second pass
at the Guidelines, followed by review of the packages for Guidelines
compliance.


Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Tue Mar 21 19:38:19 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rrHFS-0006h5C; Tue, 21 Mar 95 19:38 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA01381
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Tue, 21 Mar 1995 19:38:13 -0800
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #30) id m0rrHEn-000BzJC; Wed, 22 Mar 95 03:37 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rrGun-0002gOZ; Wed, 22 Mar 95 03:16 GMT
Message-Id: <m0rrGun-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Wed, 22 Mar 95 03:16 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
Subject: Re: Bug#617: prerm script doesn't have default response to prompt

Raul Miller writes ("Bug#617: prerm script doesn't have default response to prompt"):
> Package: xbaseR6
> 
> If someone does
> .... | xargs dpkg -i

They shouldn't do that.  dpkg and the programs it runs sometimes need
to prompt, and it's not reasonable to ask that there always be a
default action.

However ...

> and the script loops without a default response, the script invoked by
> dpkg will fall into an infinite loop.  (reading on end-of-file).

... this is a bug.  In such circumstances the postinst should exit
with a non-zero return code, so that dpkg will know that the
configuration failed.

Ian.

> In the case of xbaseR6, this happens in the prerm script.

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#617: Info received (was Bug#617: prerm script doesn't have default response to prompt)
In-Reply-To: <m0rrGun-0002gOZ.ijackson@nyx.cs.du.edu>
References: <m0rrGun-0002gOZ.ijackson@nyx.cs.du.edu>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#617" or "Re: Bug#617" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#617: prerm script doesn't have default response to prompt
Reply-To: iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: iwj10@cus.cam.ac.uk (Ian Jackson)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Wed, 22 Mar 1995 03:48:23 GMT
Resent-Message-ID: <debian-bugs-handler.617.03220340347192@pixar.com>
X-Debian-PR-Package: xbaseR6
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Wed, 22 Mar 1995 03:48:23 GMT
Received: with rfc822 via encapsulated-mail id 03220340347192;
          Wed, 22 Mar 1995 03:40:34 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rrHFS-0006h5C; Tue, 21 Mar 95 19:38 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA01381
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Tue, 21 Mar 1995 19:38:13 -0800
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #30) id m0rrHEn-000BzJC; Wed, 22 Mar 95 03:37 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rrGun-0002gOZ; Wed, 22 Mar 95 03:16 GMT
Message-Id: <m0rrGun-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Wed, 22 Mar 95 03:16 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com

Raul Miller writes ("Bug#617: prerm script doesn't have default response to prompt"):
> Package: xbaseR6
>
> If someone does
> .... | xargs dpkg -i

They shouldn't do that.  dpkg and the programs it runs sometimes need
to prompt, and it's not reasonable to ask that there always be a
default action.

However ...

> and the script loops without a default response, the script invoked by
> dpkg will fall into an infinite loop.  (reading on end-of-file).

... this is a bug.  In such circumstances the postinst should exit
with a non-zero return code, so that dpkg will know that the
configuration failed.

Ian.

> In the case of xbaseR6, this happens in the prerm script.


Message received at debian-bugs:


From legislate.com!rdr Mon Mar 20 10:34:19 1995
Return-Path: <rdr@legislate.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rqmHT-0002twC; Mon, 20 Mar 95 10:34 PST
Received: from [192.77.155.4] by pixar.com with SMTP id AA04077
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Mon, 20 Mar 1995 10:34:14 -0800
Received: by [192.77.155.4]
	id m0rqmGM-0004kuC
	(Debian /\oo/\ Smail3.1.29.1 #29.27); Mon, 20 Mar 95 13:33 EST
Message-Id: <m0rqmGM-0004kuC@[192.77.155.4]>
Date: Mon, 20 Mar 95 13:33 EST
From: rdr@legislate.com (Raul Miller)
To: debian-bugs@pixar.com
Subject: prerm script doesn't have default response to prompt

Package: xbaseR6

If someone does
.... | xargs dpkg -i

and the script loops without a default response, the script invoked by
dpkg will fall into an infinite loop.  (reading on end-of-file).

In the case of xbaseR6, this happens in the prerm script.

Raul Miller

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: rdr@legislate.com (Raul Miller)
Subject: Bug#617: Acknowledgement (was: prerm script doesn't have default response to prompt)
In-Reply-To: <m0rqmGM-0004kuC@[192.77.155.4]>
References: <m0rqmGM-0004kuC@[192.77.155.4]>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#617" or "Re: Bug#617" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#617: prerm script doesn't have default response to prompt
Reply-To: rdr@legislate.com (Raul Miller), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: rdr@legislate.com (Raul Miller)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Mon, 20 Mar 1995 18:48:02 GMT
Resent-Message-ID: <debian-bugs-handler.617.032018373918521@pixar.com>
X-Debian-PR-Package: xbaseR6
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Mon, 20 Mar 1995 18:48:02 GMT
Received: with rfc822 via encapsulated-mail id 032018373918521;
          Mon, 20 Mar 1995 18:37:40 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rqmHT-0002twC; Mon, 20 Mar 95 10:34 PST
Received: from [192.77.155.4] by pixar.com with SMTP id AA04077
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Mon, 20 Mar 1995 10:34:14 -0800
Received: by [192.77.155.4]
	id m0rqmGM-0004kuC
	(Debian /\oo/\ Smail3.1.29.1 #29.27); Mon, 20 Mar 95 13:33 EST
Message-Id: <m0rqmGM-0004kuC@[192.77.155.4]>
Date: Mon, 20 Mar 95 13:33 EST
From: rdr@legislate.com (Raul Miller)
To: debian-bugs@pixar.com

Package: xbaseR6

If someone does
.... | xargs dpkg -i

and the script loops without a default response, the script invoked by
dpkg will fall into an infinite loop.  (reading on end-of-file).

In the case of xbaseR6, this happens in the prerm script.

Raul Miller


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 06:43:02 GMT Wed 21 Jun