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

Re: pbuilder and scons

Paul Wise <pabs3@bonedaddy.net> writes:

> As other people noted new and in old threads, this is because pbuilder
> runs debian/rules clean outside the chroot. To work around it, put a '-'
> in front of the scons -c line in debian/rules, so that make ignores any
> errors from that line. An example from one of my packages:

> clean: unpatch
>         dh_testdir
>         dh_testroot
>         -scons VERSION=$(VERSION) SKIPPLUGINS=System -c
>         -rm -rf .sconf_temp .sconsign.dblite SCons/Tools/crossmingw.pyc build config.log .test
>         dh_clean

The problem with this approach is that, if scons *is* found but the action
fails for some reason, the build doesn't stop like it should.  I'd be
inclined to do something like:

    scons -h > /dev/null && scons VERSION=$(VERSION) SKIPPLUGINS=System -c

or whatever good "do nothing" option scons has to make sure it's around.

Incidentally, you shouldn't need the - in front of rm -rf.  The -f makes
it exit with a 0 status even if none of the files were found to remove.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: