summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-24 08:08:44 -0800
committerSteve Sakoman <steve@sakoman.com>2025-01-25 06:20:37 -0800
commit8e4a651917faed58f9e69473267a26cd973dbeb4 (patch)
treee45420873b7410406cc38d823383676b920a1ce5 /bitbake/lib
parent2333d6a37f4ab7be9844bcd158a2e4255880c8a1 (diff)
downloadpoky-8e4a651917faed58f9e69473267a26cd973dbeb4.tar.gz
bitbake: tests/fetch: Fix git shallow test failure with git >= 2.48
>From git 2.48 release notes: """ When "git fetch $remote" notices that refs/remotes/$remote/HEAD is missing and discovers what branch the other side points with its HEAD, refs/remotes/$remote/HEAD is updated to point to it. """ This means with git 2.48 onwards, there is a mystery "HEAD" revision appearing in some of our shallow clone tests. We can avoid this by using the same canonicalization as used for the reference revisions. This resolves autobuilder failures on the Fedora 40 workers. (Bitbake rev: aa0e540fc31a1c26839efd2c7785a751ce24ebfb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c83444d1210740e27b1744d3aa7c5cad4e28db2f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/tests/fetch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 231da669e9..afabaeba18 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -1715,6 +1715,8 @@ class GitShallowTest(FetcherTest):
1715 if cwd is None: 1715 if cwd is None:
1716 cwd = self.gitdir 1716 cwd = self.gitdir
1717 actual_refs = self.git(['for-each-ref', '--format=%(refname)'], cwd=cwd).splitlines() 1717 actual_refs = self.git(['for-each-ref', '--format=%(refname)'], cwd=cwd).splitlines()
1718 # Resolve references into the same format as the comparision (needed by git 2.48 onwards)
1719 actual_refs = self.git(['rev-parse', '--symbolic-full-name'] + actual_refs, cwd=cwd).splitlines()
1718 full_expected = self.git(['rev-parse', '--symbolic-full-name'] + expected_refs, cwd=cwd).splitlines() 1720 full_expected = self.git(['rev-parse', '--symbolic-full-name'] + expected_refs, cwd=cwd).splitlines()
1719 self.assertEqual(sorted(set(full_expected)), sorted(set(actual_refs))) 1721 self.assertEqual(sorted(set(full_expected)), sorted(set(actual_refs)))
1720 1722