summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2023-10-10 11:30:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-11 09:42:01 +0100
commitc24b7ea28021da48aa8f3498a9b899f595efde56 (patch)
tree9f69a4376e90724cc331769c3c48d3b7cd1f2141
parentea9e6ba0ab31a0b20012c283aa768496a50b527a (diff)
downloadopenembedded-core-contrib-c24b7ea28021da48aa8f3498a9b899f595efde56.tar.gz
oeqa/utils/gitarchive: fix tag pattern searching
Whenever we ask gitarchive to search for tags, we can provide it with a pattern (containing glob patterns). However, when searching for example for tags matching branch master-next, it can find more tags which does not correspond exactly to branch master-next (e.g. abelloni/master-next tags will match). Prevent those additional tags from being fetched by gitarchive by using a more specific pattern: prefix user-provided pattern with "refs/tags" Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/gitarchive.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index f9c152681d..2fe48cdcac 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -113,7 +113,7 @@ def get_tags(repo, log, pattern=None, url=None):
# First try to fetch tags from repository configured remote
cmd.append('origin')
if pattern:
- cmd.append(pattern)
+ cmd.append("refs/tags/"+pattern)
try:
tags_refs = repo.run_cmd(cmd)
tags = ["".join(d.split()[1].split('/', 2)[2:]) for d in tags_refs.splitlines()]