From 800665612aab3d0f18aacd7dc4fe4e0111ff5b2d Mon Sep 17 00:00:00 2001 From: Alexis Lothoré Date: Tue, 10 Oct 2023 11:30:12 +0200 Subject: oeqa/utils/gitarchive: fix tag pattern searching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/gitarchive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/lib/oeqa/utils/gitarchive.py') 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()] -- cgit v1.2.3-54-g00ecf