Re: [bitbake-devel][PATCH] fetch2: give every FetchData a default unpack_tracer
Siva Kumar Balasubramanian <[email protected]> Fri, 3 Jul 2026 18:09:53 +0530
| Newsgroups | org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <CACFV95Jd68gLfcBosTQ+wMbZE44fJhT=9j7b197BV8bpkgJShw@mail.gmail.com> |
--00000000000060df7a0655b43a71
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Thanks Richard, you're right, this is already fixed in master by
f0c9cf8d ("fetch2: make unpack_tracer available when fetching mirror
URLs"). My checkout was behind and I missed it. Please drop this patch
On Fri, Jul 3, 2026 at 6:00=E2=80=AFPM Richard Purdie <
[email protected]> wrote:
> On Fri, 2026-07-03 at 16:36 +0530, Siva Balasubramanian via
> lists.openembedded.org wrote:
> > Fetch() sets an unpack_tracer attribute on the FetchData objects it
> > manages, but the per-mirror FetchData objects created in
> > build_mirroruris() are constructed directly and never get one. When a
> > mirror is used for a git recipe that needs Git LFS, git.py's download()
> > performs a checkout (via Git.unpack()) on the mirror's FetchData to
> > materialise the LFS objects, and that unpack path dereferences
> > ud.unpack_tracer, failing with:
> >
> > AttributeError: 'FetchData' object has no attribute 'unpack_tracer'
> >
> > so PREMIRRORS/MIRRORS fetching is broken for git-lfs sources.
> >
> > Fix this at the source by initialising unpack_tracer to a
> > DummyUnpackTracer in FetchData.__init__(), so the attribute always
> > exists. Fetch() still overrides it with the real (possibly
> > user-configured via BB_UNPACK_TRACER_CLASS) tracer for the URLs it
> > manages; the mirror FetchData objects only perform an internal,
> > throwaway checkout that should not be traced anyway.
> >
> > Add a MirrorUriTest regression test asserting the mirror FetchData
> > objects carry an unpack_tracer.
> >
> > Reported-by: Oliver Feilner <[email protected]>
> >
> > [YOCTO #15948]
> >
> > Signed-off-by: Siva Balasubramanian <[email protected]>
>
> Wasn't this already fixed by:
>
>
> https://git.openembedded.org/bitbake/commit/?id=3Df0c9cf8d3885c5b1c2ba448=
f064421dae476fcd0
>
> ?
>
> We don't want to add a dummy one everywhere, only add one when needed
> as the patch avove does...
>
> Cheers,
>
> Richard
>
--=20
Sivakumar B
--00000000000060df7a0655b43a71
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:arial,helvetica,sans-serif">Thanks Richard, you're right, this=
is already fixed in master by<br>f0c9cf8d ("fetch2: make unpack_trace=
r available when fetching mirror</div><div class=3D"gmail_default" style=3D=
"font-family:arial,helvetica,sans-serif">URLs"). My checkout was behin=
d and I missed it. Please drop this patch</div></div><br><div class=3D"gmai=
l_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Fri=
, Jul 3, 2026 at 6:00=E2=80=AFPM Richard Purdie <<a href=3D"mailto:richa=
[email protected]">[email protected]</a>> w=
rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p=
x 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 20=
26-07-03 at 16:36 +0530, Siva Balasubramanian via <a href=3D"http://lists.o=
penembedded.org" rel=3D"noreferrer" target=3D"_blank">lists.openembedded.or=
g</a> wrote:<br>
> Fetch() sets an unpack_tracer attribute on the FetchData objects it<br=
>
> manages, but the per-mirror FetchData objects created in<br>
> build_mirroruris() are constructed directly and never get one. When a<=
br>
> mirror is used for a git recipe that needs Git LFS, git.py's downl=
oad()<br>
> performs a checkout (via Git.unpack()) on the mirror's FetchData t=
o<br>
> materialise the LFS objects, and that unpack path dereferences<br>
> ud.unpack_tracer, failing with:<br>
> <br>
> =C2=A0=C2=A0=C2=A0 AttributeError: 'FetchData' object has no a=
ttribute 'unpack_tracer'<br>
> <br>
> so PREMIRRORS/MIRRORS fetching is broken for git-lfs sources.<br>
> <br>
> Fix this at the source by initialising unpack_tracer to a<br>
> DummyUnpackTracer in FetchData.__init__(), so the attribute always<br>
> exists. Fetch() still overrides it with the real (possibly<br>
> user-configured via BB_UNPACK_TRACER_CLASS) tracer for the URLs it<br>
> manages; the mirror FetchData objects only perform an internal,<br>
> throwaway checkout that should not be traced anyway.<br>
> <br>
> Add a MirrorUriTest regression test asserting the mirror FetchData<br>
> objects carry an unpack_tracer.<br>
> <br>
> Reported-by: Oliver Feilner <<a href=3D"mailto:oliver.feilner@yaska=
wa.eu" target=3D"_blank">[email protected]</a>><br>
> <br>
> [YOCTO #15948]<br>
> <br>
> Signed-off-by: Siva Balasubramanian <<a href=3D"mailto:sivakumar.bs=
@gmail.com" target=3D"_blank">[email protected]</a>><br>
<br>
Wasn't this already fixed by:<br>
<br>
<a href=3D"https://git.openembedded.org/bitbake/commit/?id=3Df0c9cf8d3885c5=
b1c2ba448f064421dae476fcd0" rel=3D"noreferrer" target=3D"_blank">https://gi=
t.openembedded.org/bitbake/commit/?id=3Df0c9cf8d3885c5b1c2ba448f064421dae47=
6fcd0</a><br>
<br>
?<br>
<br>
We don't want to add a dummy one everywhere, only add one when needed<b=
r>
as the patch avove does...<br>
<br>
Cheers,<br>
<br>
Richard<br>
</blockquote></div><div><br clear=3D"all"></div><div><br></div><span class=
=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s=
ignature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><br></div>Sivakumar B=
<span></span><span></span></div></div></div></div></div>
--00000000000060df7a0655b43a71--