[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] quilt doesn't fail when patches/series is not a file
From: |
Raphael Hertzog |
Subject: |
Re: [Quilt-dev] quilt doesn't fail when patches/series is not a file |
Date: |
Wed, 25 Nov 2009 15:51:25 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, 25 Nov 2009, Andreas Gruenbacher wrote:
> On Wednesday 25 November 2009 10:44:51 Jean Delvare wrote:
> > What about just fixing the bug that was reported, first?
>
> I've done that now, but that doesn't address the more general problem. On
> the
> other hand, "set -e" also doesn't do the "right thing" for anything but
> simple
> commands -- it looks a bit like exception handling in more powerful
> programming languages, but in fact it's not.
It ensures the program stops as soon as an unexpected failure happens, in
general it limits the amount of damage given an unexpected situation and
makes the program return a non-zero error code so that the caller knows
that something went wrong.
I agree it's not as powerful as exception handling in other languages but
it forces to think about return values of programs just like you should
always check the return code of system calls in C.
We use it in all maintainer scripts of Debian packages (where it's even
more important given that they run as root).
I don't know what the best strategy is, but putting "set -e" in the
scripts and running the test suite is a good start I guess. After that
developers running master could provide a wider test-base.
Cheers,
--
Raphaƫl Hertzog