[apparmor] [PATCH 4/4] 0004-aa-easyprof-makefile.patch: Makefile integration

Jamie Strandboge jamie at canonical.com
Tue Feb 7 17:05:29 UTC 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20120207/6e0b53cb/attachment.pgp>


More information about the AppArmor mailing list