summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
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:43:45 +0100
commit800665612aab3d0f18aacd7dc4fe4e0111ff5b2d (patch)
tree750518be7ffbd987d1a52696253534a72c765a50 /meta/lib/oeqa/utils
parent441146001650959ea327e6eb9e6d93ccd669a8d8 (diff)
downloadpoky-800665612aab3d0f18aacd7dc4fe4e0111ff5b2d.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" (From OE-Core rev: c24b7ea28021da48aa8f3498a9b899f595efde56) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-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):
113 # First try to fetch tags from repository configured remote 113 # First try to fetch tags from repository configured remote
114 cmd.append('origin') 114 cmd.append('origin')
115 if pattern: 115 if pattern:
116 cmd.append(pattern) 116 cmd.append("refs/tags/"+pattern)
117 try: 117 try:
118 tags_refs = repo.run_cmd(cmd) 118 tags_refs = repo.run_cmd(cmd)
119 tags = ["".join(d.split()[1].split('/', 2)[2:]) for d in tags_refs.splitlines()] 119 tags = ["".join(d.split()[1].split('/', 2)[2:]) for d in tags_refs.splitlines()]