[oe-commits] [meta-openembedded] 09/23: gitpkgv.bbclass: Support also lightweight tags

git at git.openembedded.org git at git.openembedded.org
Wed Nov 20 07:33:32 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit e2c5249680cc7638b9f9a07fdddc3dca7894ad86
Author: niko.mauno at vaisala.com <niko.mauno at vaisala.com>
AuthorDate: Tue Nov 19 08:46:42 2019 +0000

    gitpkgv.bbclass: Support also lightweight tags
    
    When checking for commit specific tags during GITPKGVTAG resolution, use
    additional '--tags' and '--exact-match' options for 'git describe'
    command.
    
    This changes the behaviour so that in case an annotated tag does not
    exist for the particular commit, then the latest lightweight
    (non-annotated) tag is used instead, in case that commit has at least
    one such tag.
    
    Signed-off-by: Niko Mauno <niko.mauno at vaisala.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-oe/classes/gitpkgv.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass
index 22609f5..ab591bd 100644
--- a/meta-oe/classes/gitpkgv.bbclass
+++ b/meta-oe/classes/gitpkgv.bbclass
@@ -7,8 +7,8 @@
 #   NN equals the total number of revs up to SRCREV
 #   GITHASH is SRCREV's (full) hash
 #
-# - GITPKGVTAG which is the output of 'git describe' allowing for
-#   automatic versioning
+# - GITPKGVTAG which is the output of 'git describe --tags --exact-match'
+#   allowing for automatic versioning
 #
 # gitpkgv.bbclass assumes the git repository has been cloned, and
 # contains SRCREV. So ${GITPKGV} and ${GITPKGVTAG} should never be
@@ -103,7 +103,7 @@ def get_git_pkgv(d, use_tags):
                 if use_tags:
                     try:
                         output = bb.fetch2.runfetchcmd(
-                            "git --git-dir=%(repodir)s describe %(rev)s 2>/dev/null"
+                            "git --git-dir=%(repodir)s describe %(rev)s --tags --exact-match 2>/dev/null"
                             % vars, d, quiet=True).strip()
                         ver = gitpkgv_drop_tag_prefix(output)
                     except Exception:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list