Re: pbuilder and scons
Paul Wise <email@example.com> 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
> -scons VERSION=$(VERSION) SKIPPLUGINS=System -c
> -rm -rf .sconf_temp .sconsign.dblite SCons/Tools/crossmingw.pyc build config.log .test
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 (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>