Bug 14709 - master as 3.4.x - devtool + github
Summary: master as 3.4.x - devtool + github
Status: RESOLVED FIXED
Alias: None
Product: eSDK
Classification: Yocto Project Subprojects
Component: eSDK (show other bugs)
Version: 3.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.0 M3
Assignee: Robert Berger
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-02-01 14:01 UTC by Robert Berger
Modified: 2025-02-14 16:48 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Berger 2022-02-01 14:01:38 UTC
I am testing poky:

commit c3f50f747c8ee739919268e1c10980b93d1f3e64
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Mon Jan 17 21:56:15 2022 +0000

plus some other layers.

In my eSDK/devtool testcase I do that:

devtool add nettoe https://github.com/RobertBerger/nettoe.git

It creates a recipe with this SRC_URI:

SRC_URI = "git://github.com/RobertBerger/nettoe.git;protocol=https"

... but when I do that:

devtool build-image core-image-minimal

I get this warning:

WARNING: URL: git://github.com/RobertBerger/nettoe.git;protocol=https does not set any branch parameter. The future default branch used by tools and repositories is uncertain and we will therefore soon require this is set in all git URLs.

I totally get it, but shouldn't devtool automatically generate something which does not spit out a warning?

Especially when the doc claims that --srcbranch default is master?

devtool add --help
...
--srcbranch SRCBRANCH, -B SRCBRANCH
                        Branch in source repository if fetching from an SCM such 
                        as git (default master)
...

Rhis is my workaround for now:

devtool add --srcbranch master nettoe https://github.com/RobertBerger/nettoe.git

since now the SRC_URI is:

SRC_URI = "git://github.com/RobertBerger/nettoe.git;protocol=https;branch=master"
Comment 1 Saul Wold 2022-02-03 17:05:58 UTC
Hi Robert,

I am reviewing this bug and I can see a change from Stefan

392f2933b6 Stefan Herbrechtsmeier recipetool: Set master branch only as fallback

That does exactly what you asking about, it was merged back in December and the commit you are using seems to be from the development branch of 3.5.  Can you confirm you have the above commit.

I ran both recipetool create and devtool add and the generated BB file contains a correct SRCURI

SRC_URI = "git://github.com/RobertBerger/nettoe.git;protocol=https;branch=master"
Comment 2 Robert Berger 2022-02-14 14:24:27 UTC
It appears that I have this commit:

$ git rev-list 2022-01-15-master-as-honister-3.4.66+ | grep `git rev-parse 392f2933b6`
392f2933b6d4cc213f4498b70338451a5973bd07

git log 392f2933b6d4cc213f4498b70338451a5973bd07

commit 392f2933b6d4cc213f4498b70338451a5973bd07
Author: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Date:   Wed Dec 8 11:18:35 2021 +0100

    recipetool: Set master branch only as fallback
    
    The commit 'meta/scripts: Manual git url branch additions (dc53fe75cc)'
    sets the branch= parameter too early to master and thereby breaks the
    -B/--srcbranch option.
    
    ERROR: branch= parameter and -B/--srcbranch option cannot both be specified - use one or the other
    
    (From OE-Core rev: 34ece8030e7a6a100b5e3e7b94e6c786c0e199a6)
    
    Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 3 Robert Berger 2022-02-14 14:31:15 UTC
BTW I am on poky master commit c3f50f747c8ee739919268e1c10980b93d1f3e64 (plus some of my own hacks).

https://github.com/RobertBerger/poky

https://github.com/RobertBerger/poky/tree/2022-01-15-master-as-honister-3.4.66+
Comment 4 Robert Berger 2022-02-14 16:01:20 UTC
It appears that I have this commit:

$ git rev-list 2022-01-15-master-as-honister-3.4.66+ | grep `git rev-parse 392f2933b6`
392f2933b6d4cc213f4498b70338451a5973bd07

git log 392f2933b6d4cc213f4498b70338451a5973bd07

commit 392f2933b6d4cc213f4498b70338451a5973bd07
Author: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Date:   Wed Dec 8 11:18:35 2021 +0100


and this fixes it!!!

Sorry for the confusion.
Comment 5 Saul Wold 2022-02-14 16:03:30 UTC
Stefan's patch does indeed fix the issue.
Comment 6 Randy MacLeod 2025-02-14 16:46:36 UTC
bulk change to add Saul's non-WR address.
Comment 7 Randy MacLeod 2025-02-14 16:48:20 UTC
Bulk change: Remove Saul's old WR address.