Skip to contentSkip to conversation

bitbake: fetch2: make unpack_tracer available when fetching mirror URLs

PATCH Superseded Andreas Mützel 2 participants 4 messages Jun 16

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: fetch2: make unpack_tracer available when fetching mirror URLs

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]

---
 lib/bb/fetch2/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/fetch2/__init__.py +2 -0
index 1a6ff25d4d..60bdd32681 100644
@@ -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))
Signature · 1 line
2.52.0
#1 lore raw
Quoted 7 lines · Andreas Mützel via lists.openembedded.org

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:

Quoted 6 lines

AttributeError: 'FetchData' object has no attribute 'unpack_tracer'

[YOCTO #15948]

---

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

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 fetch2: make unpack_tracer available when fetching mirror URLs

When building the FetchData for fetching from mirrors, pass any available unpack_tracer to the newly-created object.

This is required to allow fetching repositories that use git-lfs from MIRRORS or PREMIRRORs and fixes the following failure in the git fetcher's unpack() method:

AttributeError: 'FetchData' object has no attribute 'unpack_tracer'

[YOCTO #15948].

---
 lib/bb/fetch2/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/fetch2/__init__.py +2 -0
index 1a6ff25d4d..60bdd32681 100644
@@ -1010,6 +1010,8 @@ def build_mirroruris(origud, mirrors, ld):
                     newud = FetchData(newuri, ld)
                     newud.ignore_checksums = True
                     newud.setup_localpath(ld)
+                    if hasattr(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))
Signature · 1 line
2.52.0
#3 lore raw
In reply to Mathieu Dubois-Briand
Quoted 5 lines · On Tuesday, 16 June 2026 16:39:55 CEST Mathieu Dubois-Briand wrote:
Quoted 1 line

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

Signature · 12 lines
emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail [email protected]
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
Office München: Am Knie 16, 81241 München, Germany
http://www.emlix.com

emlix - your embedded Linux partner