| Message ID | 20260616064749.36789-1-andreas.muetzel@emlix.com |
|---|---|
| State | New |
| Headers | show |
| Series | bitbake: fetch2: make unpack_tracer available when fetching mirror URLs | expand |
On Tue Jun 16, 2026 at 8:47 AM CEST, Andreas Mützel via lists.openembedded.org wrote: > When building the FetchData for fetching from mirrors, pass any > available unpack_tracer to the newly-created object. > > This fixes the following error that occurs in the git fetcher's > unpack() method when fetching repos that use git-lfs from MIRRORS > or PREMIRRORs: > > AttributeError: 'FetchData' object has no attribute 'unpack_tracer' > > [YOCTO #15948] > > Signed-off-by: Andreas Mützel <andreas.muetzel@emlix.com> > --- Hi Andreas, It looks like bitbake-selftest is now failing: ERROR: test_mirror_of_mirror (bb.tests.fetch.MirrorUriTest.test_mirror_of_mirror) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/tests/fetch.py", line 552, in test_mirror_of_mirror uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/fetch2/__init__.py", line 1076, in build_mirroruris adduri(origud, uris, uds, mirrors, origud.mirrortarballs or [None]) File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/fetch2/__init__.py", line 1059, in adduri if ud.unpack_tracer: ^^^^^^^^^^^^^^^^ AttributeError: 'FetchData' object has no attribute 'unpack_tracer' https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4130 https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/4052 https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3902 Can you have a look at the issue? Thanks, Mathieu
On Tuesday, 16 June 2026 16:39:55 CEST Mathieu Dubois-Briand wrote: > > It looks like bitbake-selftest is now failing: > [...] > AttributeError: 'FetchData' object has no attribute 'unpack_tracer' > [...] > Can you have a look at the issue? Hi Mathieu, sorry about that! Reproduced and fixed that on my end, I'll send patch v2 right away. Best regards, Andreas
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 1a6ff25d4d..60bdd32681 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1010,6 +1010,8 @@ def build_mirroruris(origud, mirrors, ld): newud = FetchData(newuri, ld) newud.ignore_checksums = True newud.setup_localpath(ld) + if ud.unpack_tracer: + newud.unpack_tracer = ud.unpack_tracer except bb.fetch2.BBFetchException as e: logger.debug("Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) logger.debug(str(e))
When building the FetchData for fetching from mirrors, pass any available unpack_tracer to the newly-created object. This fixes the following error that occurs in the git fetcher's unpack() method when fetching repos that use git-lfs from MIRRORS or PREMIRRORs: AttributeError: 'FetchData' object has no attribute 'unpack_tracer' [YOCTO #15948] Signed-off-by: Andreas Mützel <andreas.muetzel@emlix.com> --- lib/bb/fetch2/__init__.py | 2 ++ 1 file changed, 2 insertions(+)