[PATCH] bitbake: fetch2: make unpack_tracer available when fetching mirror URLs

Andreas Mützel <[email protected]> Tue, 16 Jun 2026 08:47:39 +0200
Newsgroups org.openembedded.lists.bitbake-devel
Message-ID <[email protected]>
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 <[email protected]>
---
 lib/bb/fetch2/__init__.py | 2 ++
 1 file changed, 2 insertions(+)

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))
-- 
2.52.0