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

Christian Boltz apparmor at cboltz.de
Tue Feb 7 16:05:08 UTC 2012


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.)


Regards,

Christian Boltz
-- 
> > Kann man Ösis provozieren?
> Wieso nicht?
Dazu müssen sie doch erst einmal merken, daß man sie provozieren
will.       [Adalbert Michelic und Bernd Brodesser in suse-talk]




More information about the AppArmor mailing list