On Tue, 2012-02-07 at 17:05 +0100, Christian Boltz wrote:
> Hallo Leute,
> 
> Am Dienstag, 7. Februar 2012 schrieb Jamie Strandboge:
> > diff -Naurp -x .bzr -x common apparmor-trunk/utils/Makefile 
> > apparmor-trunk-easyprof/utils/Makefile
> > --- apparmor-trunk/utils/Makefile       2011-12-13 17:34:55.000000000 -0600
> > +++ apparmor-trunk-easyprof/utils/Makefile      2012-02-07 
> > 07:36:12.000000000 -0600
> [...]
> >  check:
> >         for i in ${MODULES} ${PERLTOOLS} ; do \
> >                 perl -c $$i || exit 1; \
> >         done
> > +       tmpfile=$$(mktemp --tmpdir aa-pyflakes-XXXXXX); \
> > +       for i in ${PYTOOLS} apparmor aa-status test/*.py; do \
> > +               echo Checking $$i; \
> > +               pyflakes $$i 2>&1 | grep -v "undefined name '_'" > 
> > $$tmpfile; \
> > +               test -s $$tmpfile && cat $$tmpfile && rm -f $$tmpfile && 
> > exit 1; \
> 
> From reading the code, I'd guess that you get a non-zero exitcode if 
> $tmpfile in the last loop run is empty while you expect $?==0.
> 
> > +       done; \
> > +       rm -f $$tmpfile
> 
> OK, those two lines probably "hide" the non-zero exitcode.
> Nevertheless using   done || true;   to make it obvious would be a good 
> idea IMHO. (Not sure if you still need the \ to keep the $tmpfile variable.)

It does cleanup, but I think you are right that it would be cleaner. I
have added this to my branch also. Thanks!

-- 
Jamie Strandboge             | http://www.canonical.com

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to