aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/classes/gitpkgv.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass
index 22609f584f..ab591bd45c 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: