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

Re: Debian policy, a problem or a misunderstand ?



Laurent Guignard <lguignard.debian@gmail.com> writes:

> 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

Yes.

> and later in paragraph, if all went well, the script has to exit
> with non-zero status.

No, you've flipped a boolean somewhere :-) It says exactly the
opposite: it is important that the script *not* exit with a non-zero
status if all went well.

> How do i have understand that ?

Perhaps the double negatives are confusing you.

> My opinion is that if everything went well, the exit status has to
> be zero other else a non-zero status ?

Yes, that's the meaning of the passage you quoted.

-- 
 \        “I don't accept the currently fashionable assertion that any |
  `\       view is automatically as worthy of respect as any equal and |
_o__)                                   opposite view.” —Douglas Adams |
Ben Finney


Reply to: