[apparmor] [PATCH v3 2/5] common: Simplify REPO_VERSION_CMD in Make.rules

Tyler Hicks tyhicks at canonical.com
Wed Jan 27 21:47:49 UTC 2016


On 2016-01-27 12:42:35, Steve Beattie wrote:
> On Wed, Jan 27, 2016 at 12:26:59PM -0600, Tyler Hicks wrote:
> > 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>
> > Acked-by: Christian Boltz <apparmor at cboltz.de>
> > Acked-by: Steve Beattie <steve at nxnw.org>
> > ---
> >  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
> >  
> >  ifndef PYTHON_VERSIONS
> >  PYTHON_VERSIONS = $(call map, pathsearch, python2 python3)
> 
> I know I already acked this one as-is, but can you include the following
> patch so that 'make repo_version' emits the newline that was dropped?

No problem. Sorry that I missed this one when I told cboltz that the
newline didn't matter. :/

Tyler

> 
> (It's not a big deal, I don't think anything uses make repo_version on a
> regular basis; it exists as a handy debugging aid to determine whether
> the repo revision is being generated correctly.)
> 
> ---
>  common/Make.rules |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: b/common/Make.rules
> ===================================================================
> --- a/common/Make.rules
> +++ b/common/Make.rules
> @@ -66,7 +66,7 @@ version:
>  .PHONY: repo_version
>  .SILENT: repo_version
>  repo_version:
> -	 $(value REPO_VERSION_CMD)
> +	 echo $(shell $(value REPO_VERSION_CMD))
>  
>  .PHONY: pod_clean
>  ifndef VERBOSE
> 
> -- 
> Steve Beattie
> <sbeattie at ubuntu.com>
> http://NxNW.org/~steve/



> -- 
> 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/20160127/ff51a169/attachment.pgp>


More information about the AppArmor mailing list