Re: Debian policy, a problem or a misunderstand ?
On Sat, Oct 18, 2008 at 07:16:50AM +0200, Laurent Guignard wrote:
> Hi mentors,
>
> I read the Debian policy to create my package and i read this at chapter
> "6.1 Introduction to package maintainer scripts"
>
> "The package management system looks at the exit status from these
> scripts. *It is important that they exit with a non-zero status if there
> is an error*, so that the package management system can stop its
> processing. For shell scripts this means that you almost always need to
> use set -e (this is usually true when writing shell scripts, in fact).
> It is also important, of course, that *they don’t exit with a non-zero
> status if everything went well.*"
>
> It seems that if an error occurs, the script have to exit with non-zero
> status and later in paragraph, if all went well, the script has to exit
> with non-zero status.
>
> How do i have understand that ?
>
> My opinion is that if everything went well, the exit status has to be
> zero other else a non-zero status ?
Basic shell exit code convention may be non-intuitive.
non-zero if ERROR
zero if success
osamu@snoopy:~$ true ; echo $?
0
osamu@snoopy:~$ false ; echo $?
1
Osamu
Reply to: