On Mon, Dec 29, 2025 at 11:23 PM Chen, Qi <[email protected]> wrote:

> Hi Bruce,
>
>
>
> The new go-mod-vcs recently introduced in meta-virt  has some some
> problems.
>
>
>
> The first and most significant one is the misuse of
> BB_GIT_SHALLOW_EXTRA_REFS. It causes fetching failure when shallow tarball
> generation is enabled.
>

I wouldn't call it a misuse, it is actually required to make the support
work
and attempt to save some download space. There are thousands of dependencies
for some of the recipes and MANY of them have tags that aren't on branches,
or
aren't at the tip of branches, so those refs are there to force a deep
enough fetch
or to ensure that bitbake does the same "deshallowing"  as was done during
generation.

I could probably switch it out for tag= in the different entries. I've made
that
tweak and will run some tests.



> Use the following steps to reproduce the error:
>
>    1. Add in local.conf:
>
> BB_GENERATE_SHALLOW_TARBALLS = "1"
>
> BB_GIT_SHALLOW = "1"
>
>    2. bitbake cni -c fetch
>
>
>
> Error message: fatal: couldn't find remote ref v0.0.4
>
> Root cause: the repos specified in SRC_URI does not contain the required
> extra refs specified by BB_GIT_SHALLOW_EXTRA_REFS.
>
I run with that all the time, I've never seen it, those
BB_GIT_SHALLOW_EXTRA_REFS
are
not magic, they come directly from the repositories during discovery and
are required to deshallow
a repository.

My tests with the tag parameter may solve the issue. So stay tuned, I have
that and several other
changes pending. But none of them will be until the end of next week once I
am back in the office.


>
>
> The second one is the duplicate entries in SRC_URI. Example: errdefs in
> docker-compose.
>
>
>

It builds fine here, what issues are you seeing with it ? Are you using VCS
mode ? or hybrid ?

You can be assured that anything I pushed has been built many times, and has
been runtime tested. So the first information you need to provide is more
details
about what you are building, so I can track down the differences.


> The third one is the ‘shallow=1’ parameter in SRC_URI. The problem is that
> git fetcher does not support such parameter.
>
> In fetch2/git.py: ud.shallow = d.getVar("BB_GIT_SHALLOW") == "1"
>
> So I guess these could be removed? And switching to use
> BB_GIT_SHALLOW:pn-xxx = “1”?
>

No. I plan to add more support for that later, it just isn't ready yet.
They will stay.


>
> P.S.
>
> I sent a related patch to bitbake:
> https://lists.openembedded.org/g/bitbake-devel/message/18656
>
> The problem in bitbake is revealed by the current SRC_URI settings in
> meta-virt.
>
> If you get similar error, you can apply the above patch.
>

If I was going to see that error, I would have already ...

Bruce



>
>
> Regards,
>
> Qi
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9511): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9511
Mute This Topic: https://lists.yoctoproject.org/mt/116993898/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to