Re: [yocto] [bitbake-devel] Git Fetcher Branch Default

2021-05-12 Thread Martin Jansa
On Wed, May 12, 2021 at 05:51:24AM -0700, Chuck Wolber wrote:
> I got a fetcher failure on go-systemd today, which puzzled me. That
> recipe has not changed in ages, and the SRCPV hash is clearly visible
> in the repository.
> 
> After looking at it closer, it seems that github.com/coreos/go-systemd
> has changed its default branch from master to main about six days ago.
> This appears to break a fundamental assumption on the part of the
> fetcher when looking for SRCREV and SRCPV hashes.
> 
> Looking at lib/bb/fetch2/git.py makes it evident that this is the
> case. I can trivially fix this with a .bbappend, but it seems to me
> that the fundamental default branch assumption needs to be updated.
> 
> Has anyone discussed adding main to the list of default branches to
> try? If not, I may be able to come up with a patch, but the code does
> process default branches as a list, so I will need to think a bit on
> the best way to approach this. Any guidance would be appreciated.

I agree it's a bit annoying that some projects have chosen to rename the
existing branches instead of just adopting "main" to be the default
branch only for new projects (as the defaults changed e.g. on github).

I've already added explicit branch=main in 10+ recipes in various layers
for dunfell and newer branches (ostree in meta-oe just today or e.g.
https://github.com/ros/meta-ros/pull/846 yesterday).

Luckily it's easy to fix with local bbappend, so even people using
unsupported release (zeus and older) can do so or finally upgrade to
some supported release which might have this fix already.

It was also discussed shortly in #yocto yeasterday:

22:38 < zeddii> RP: did we come up with a policy on anything we can do
with the fetcher to make "main" be a fallback default to master. Or was
the end decision to just add explicit branch statements everywhere ?
23:21 < RP> zeddii: I'm open to patch proposals or we just set the
branch on urls
23:23 < RP> zeddii: being explicit is perhaps the better option that
magic in the fetcher

And I agree with RP, especially because fetcher magic won't get
backported to old bitbake used in zeus and older anyway, so it won't
help there and backporting fetcher change locally will be more risky
than backporting simple SRC_URI change for individual recipes which need
it.

Regards,


signature.asc
Description: PGP signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#53477): https://lists.yoctoproject.org/g/yocto/message/53477
Mute This Topic: https://lists.yoctoproject.org/mt/82772334/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] [bitbake-devel] Git Fetcher Branch Default

2021-05-12 Thread Konrad Weihmann
On 12 May 2021 14:51, Chuck Wolber  wrote:I got a fetcher failure on go-systemd today, which puzzled me. That

recipe has not changed in ages, and the SRCPV hash is clearly visible

in the repository.



After looking at it closer, it seems that github.com/coreos/go-systemd

has changed its default branch from master to main about six days ago.

This appears to break a fundamental assumption on the part of the

fetcher when looking for SRCREV and SRCPV hashes.



Looking at lib/bb/fetch2/git.py makes it evident that this is the

case. I can trivially fix this with a .bbappend, but it seems to me

that the fundamental default branch assumption needs to be updated.Iirc there has been the same discussion already last year or the year before... and the agreement was to leave it as it is. IMHO most of the used projects still go with master instead of main, so a patch of yours would create a lot of work for the majority of the recipes.And as there is the branch attribute for the git fetcher already available (and widely used for especially these cases) I personally don't see the need for such a patch, unless it provides full backward compatibility



Has anyone discussed adding main to the list of default branches to

try? If not, I may be able to come up with a patch, but the code does

process default branches as a list, so I will need to think a bit on

the best way to approach this. Any guidance would be appreciated.



..Ch:W..





-- 

"Perfection must be reached by degrees; she requires the slow hand of

time." - Voltaire









-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#53476): https://lists.yoctoproject.org/g/yocto/message/53476
Mute This Topic: https://lists.yoctoproject.org/mt/82772107/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-