[Pkg-octave-devel] [Pkg-octave-commit] [SCM] octave-communications branch, master, updated. 70ca29bea376fbc1971653436a83293c72f9ed96

Rafael Laboissiere rafael at debian.org
Sat Jun 6 13:49:51 UTC 2009


* Ólafur Jens Sigurðsson <ojsbug at gmail.com> [2009-06-06 13:43]:

> On Sat, Jun 06, 2009 at 03:04:59PM +0200, Rafael Laboissiere wrote:
> > Why is this change necessary?
> 
> Well, I was talking to someone on #debian-devel and he mentioned this
> and then I had a look at the policy
> (http://www.debian.org/doc/debian-policy/ch-source.html#s4.6) and they
> mention this also so I thought this would be good to implement. I
> don't know much about makefiles so this could be wrong, please correct
> if it is.

The relevant text in the Policy is the following:

    4.6 Error trapping in makefiles
    [...]
    Every time you put more than one shell command (this includes using a loop)
    in a makefile command you must make sure that errors are trapped. For simple
    compound commands, such as changing directory and then running a program,
    using && rather than semicolon as a command separator is sufficient. For
    more complex commands including most loops and conditionals you should
    include a separate set -e command at the start of every makefile command
    that's actually one of these miniature shell scripts. 

The recommendation above is exactly what my original code below is
supposed to do:

        for f in $(wrongperm) ; do                                    \
                [ -x $(pkgdir)/$$f ] && chmod -x $(pkgdir)/$$f ;      \
        done
	
Note the "&&" between the "[" and the "chmod" commands.  If the "[" command
fails, then the error will be trapped and make will stop without executing
the "chmod" command.

Besides, this is done on purpose, because I wish debia/rules to fail
if/when upstream will have fix the file permissions and, hence, I will
remove the code around $(wrongperm).

Please, revert your "set -e" changes.

-- 
Rafael



More information about the Pkg-octave-devel mailing list