[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bug #23953 ae: postinst does not check for errors



On Fri, 17 Jul 1998, Santiago Vila Doncel wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> 
> On Fri, 17 Jul 1998, Dale Scheetz wrote:
> 
> > On Fri, 17 Jul 1998, Herbert Xu wrote:
> > 
> > > On Thu, Jul 16, 1998 at 07:54:26PM -0400, Dale Scheetz wrote:
> > > >
> > > > The function of these scripts is to conditionally install ae as "EDITOR"
> > > > using alternatives. If this fails the rest of the ae install is not
> > > > effected, and ae will be fully functional.
> > > 
> > > Sure, so there is no problem setting -e then.
> > 
> > If I set -e and update-alternatives fails then the script fails and the
> > install fails. Without set -e if update-alternatives fails, the script
> > does not, and the install succeeds.
> 
> But the point is that we want it to fail! That's why the policy is written
> in the way it is written.

But I don't want it to fail, because there is no reason for it to do so,
and this editor may very well be the only one on the system! Failure of
the install for the trivial failure to register as "EDITOR" is
unnecessary, and undesirable.

The reason that this policy was written, is that set -e causes a general
script to exit whenever an error occurs in any of its calls. The reason we
generally wish to fail in these cases, is that this failure will most
likely effect further commands, yielding indesirable, and possibly
disasterous results. Thus a find that fails does not have its empty
contents concatinated to /* for use in a succeeding rm -r command.

None of these effects will be realized if this script fails, and an
undesirable side effect does result if its failure halts the install.

> 
> If update-alternatives fails, the install should *not* succeed.
> 
And why not? The update-alternatives failure does not impact the further
correct installation of the ae package, and after the install ae will
function completely as expected when called as "ae". The fact that editor
will not envoke the ae editor is, at this point, unavoidable, but not any
reason to reject the rest of the install process.

> I will quote policy:
> 
>    Shell scripts (sh and bash) should almost certainly start with set -e
>    so that errors are detected. Every script must use set -e or check the
>    exit status of every command.
> 
> I think the policy is very clear here. Dale, I think you are interpreting
> the policy in a very liberal way in this case.

I think the policy is clear here as well. I also think that in this case
that it is wrong. It also fails to supply the rational I supplied above,
that would allow the flexibility to install a package under limited
failure conditions.

I am not interpreting policy in any way here. I am asking that policy be
fixed to repair its broken statements, so ae can continue to install in
the best way possible. That is the reason I brought this to the policy
group in the first place.

Waiting is,

Dwarf
--
_-_-_-_-_-   Author of "The Debian Linux User's Guide"  _-_-_-_-_-_-

aka   Dale Scheetz                   Phone:   1 (850) 656-9769
      Flexible Software              11000 McCrackin Road
      e-mail:  dwarf@polaris.net     Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--  
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: