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

Re: pbuilder and scons



On Tue, Dec 13, 2005 at 11:30:04AM -0500, Roberto C. Sanchez wrote:
> Paul Wise wrote:
> > 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
> > 
> 
> That is awesome.  I have read many docs about make, but never knew that
> the '-' at the beginning of the line caused make to ignore errors from
> that command.  Maybe I have just overlooked it all this time.
But please don't overuse it.  Granularity is a good thing here.
-scons means that *every* error is ignored.  It would be much better
to check for precisely what you need, possibly:

  [ -e /usr/bin/scons ] && scons VERSION=$(VERSION) SKIPPLUGINS=System -c

What you want to avoid is the case where execution of "scons" fails
for some other reason.

There was a recent discussion about this granularity in error
checking, either on -devel list, or in a bug log (probably both); I
forget the context, though.

Anyway, pbuilder does what it does for a good reason.  Why subvert its
intent?

-- 
Clear skies,
Justin



Reply to: