[apparmor] [PATCH v2 2/5] common: Simplify REPO_VERSION_CMD in Make.rules
Tyler Hicks
tyhicks at canonical.com
Thu Jan 7 17:30:55 UTC 2016
On 2016-01-07 16:46:03, Christian Boltz wrote:
> Hello,
>
> Am Mittwoch, 6. Januar 2016 schrieb Tyler Hicks:
> > bzr version-info supports directly printing the bare revno to stdout
> > so we should use that instead of parsing the default verbose output.
> >
> > This change simplifies the shell snippet used to assign the
> > REPO_VERSION_CMD make variable. It was also tested to work with the
> > bzr present in Ubuntu 12.04.
> >
> > Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> > ---
> > common/Make.rules | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/common/Make.rules b/common/Make.rules
> > index 148f80e..c20277b 100644
> > --- a/common/Make.rules
> > +++ b/common/Make.rules
> > @@ -45,7 +45,7 @@ define nl
> >
> > endef
> >
> > -REPO_VERSION_CMD=([ -x /usr/bin/bzr ] && /usr/bin/bzr version-info .
> > 2> /dev/null || awk '{ print "revno: "$2 }' common/.stamp_rev) | awk
> > '/^revno:/ { print $2 }'
> > +REPO_VERSION_CMD=[ -x /usr/bin/bzr ] && /usr/bin/bzr version-info
> > --custom --template="{revno}" . 2> /dev/null || awk '{ print $2 }'
> > common/.stamp_rev
>
> There's a minor difference in the result - the old code includes a \n,
> the new code doesn't.
Correct.
>
> If you want to exactly match the old behaviour, use
> --template="{revno}\n"
>
> I'm not sure if we need the \n, so I'll leave deciding that to you.
Nope, we don't need it.
>
> With or without the \n (re)added:
> Acked-by: Christian Boltz <apparmor at cboltz.de>
Thanks!
Tyler
>
>
> The two remaining patches (3/5 and 4/5) contain a bit too much Makefile
> magic for me [1], so I'll leave reviewing them to someone else ;-)
>
>
> Regards,
>
> Christian Boltz
>
> [1] they look good, but I'd have to read the documentation about some
> details to make sure they do what I expect them to do ;-)
> --
> [dracut] I'm reluctant to waste time dealing with things like e.g.
> modules.d/90crypt/cryptroot-ask.sh. That feels like boot.crypto which
> was rightfully killed by systemd raising from the dead.
> [Ludwig Nussel in opensuse-packaging]
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160107/08b1ad8e/attachment.pgp>
More information about the AppArmor
mailing list