[apparmor] [patch] [utils] Fix unnamed arguments in messages for translatable string
Christian Boltz
apparmor at cboltz.de
Sun Sep 14 17:49:16 UTC 2014
Hello,
Am Sonntag, 14. September 2014 schrieb Kshitij Gupta:
> The translatable strings used unnamed arguments which generated a
> number of warnings, as noted by @sbeattie in a previous patch.
>
> This patch:
> - replaces unnamed arguments with named arguments wherever more than 1
> one arguments ware present in a message
> - minor fix in aa-unconfined for pname argument in 2 strings
> - updated pot files (as a side-effect of testing with make)
Thanks for the patch!
Acked-by: Christian Boltz <apparmor at cboltz.de>
(This is also an improvement for translators because they know what %s
means. Maybe we should use %(name)s in some strings with one %s whenever
it isn't obvious what %s means. We can do this whenever we touch a piece
of code, no need to go over all strings now.)
> PS:
> Testing with make file I found two things:
> 1. running make check fails saying it doesn't recognise raw_input()
> apparmor/ui.py:179: undefined name 'raw_input'
>
> I think pyflakes is being run for Python3 and hence the error. Is
> there any easy way to make this work?
Good question. Steve?
> 2. I also get a curious second trace,
> "/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/
> utils/apparmor/logparser.py", line 18, in <module>
> import LibAppArmor
> ImportError: No module named LibAppArmor
> I dont know enough about make files to debug it. (I feel it has
> something to do with Python2 not having the module)
Did you try make check PYTHON=python3 ?
That said - Makefiles are quite easy to understand ;-)
They have build targets ("check:"), optionally with dependencies on
other build targets or files ("check: test.py check-python"). Think of
build target == function. In the second example, the build targets
"test.py" and "check-python" will be called.
If a file with the same name as a build target exists, and the
dependencies also exist as file and are older than the target file, make
skips this part because it's already done (think of "foo.o: foo.c").
If a target should always be executed (like "check"), add it to .PHONY.
Each build target contains some commands to execute - the important
thing to know is that the lines containing commands need to start with a
tab.
On top of that, there are variable definitions etc. - but nothing that
would be unknown to a programmer ;-)
Regards,
Christian Boltz
--
Nur das W3C-Logo müsste auf dieser Seite eigentlich ausgeblendet werden
und durch "Ich bin eine HTML-Drecksau" ersetzt werden. :-)
[Ratti über das Gästebuch auf gesindel.de]
More information about the AppArmor
mailing list