| Summary: | devtool: add: automatically set branch for git URLs if not master | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Paul Eggleton <bluelightning> |
| Component: | Scripts and Tools | Assignee: | Rebecca Chang <rebecca.swee.fun.chang> |
| Status: | VERIFIED FIXED | QA Contact: | Shashwat Pandey <shashwatx.pandey> |
| Severity: | enhancement | ||
| Priority: | Medium+ | CC: | brianx.j.kurle, ee.peng.yeoh, ross.burton, shashwatx.pandey, wmills |
| Version: | 2.2 | ||
| Target Milestone: | 2.4 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
| Bug Depends on: | |||
| Bug Blocks: | 11393 | ||
|
Description
Paul Eggleton
2017-04-20 02:58:10 UTC
Paul, certain repository has same source revision on multiple branches. How do we handle this kind of situation? It is not possible for devtool to get the correct branch in this situation. So, do we print out the branch that having the source revision and error out? That's a good point. If the revision is on multiple branches, and we've already checked that one of them isn't master, then yes I don't think we have much choice but to error out telling the user they need to select one. Submitted fix to mailing list. http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139574.html Patches are now staging at mut branch. Moving this to M3 as it has already overdue for M2. v2 patch series fixed comment from Chris: http://lists.openembedded.org/pipermail/openembedded-core/2017-August/140860.html OE-Core rev: ecca596b75cfda2f798a0bdde75f4f774e23a95b Verification logs: a) Checkout to origin/master branch to get the fixes. b) Scenario1: When Revision is not on master- Perform devtool add bbexample-custom 'https://github.com/epyeoh/bbexample.git;rev=f26a5d9e53524edc72b9f476a628c35eb82e497b' c) Verify that the correct branch is added to the SRC_URI: SRC_URI = "git://github.com/epyeoh/bbexample.git;protocol=https;branch=dev1" d) Scenario2: If the revision is on multiple branches, and none of them is master: Perform devtool add bbexample 'https://github.com/epyeoh/bbexample.git;rev=a1e995ea27eb2e800cee1fc7b37672116aee2305' e) Verify the error for multiple branch of same revision: ERROR: Revision a1e995ea27eb2e800cee1fc7b37672116aee2305 was found on multiple branches: dev2 dev3 Please provide the correct branch with -B/--srcbranch ERROR: Command 'script -e -q -c "recipetool --color=always create --devtool -o /tmp/devtoolvnmzcrd_ 'https://github.com/epyeoh/bbexample.git;rev=a1e995ea27eb2e800cee1fc7b37672116aee2305' -x /workdir/build/workspace/sources/devtoolsrcqsb05ogk -N bbexample" /dev/null' failed f) Scenario3: If the revision is on multiple branch and branch is specified: Perform devtool add bbexample 'https://github.com/epyeoh/bbexample.git;rev=a1e995ea27eb2e800cee1fc7b37672116aee2305;branch=dev3' g) Verify that the correct branch is added to the SRC_URI: SRC_URI = "git://github.com/epyeoh/bbexample.git;branch=dev3;protocol=https" h) Scenario4: If the revision is on multiple branch and one of them is master: Perform devtool add bbexample 'https://github.com/shashwatpandey221091/bbexample.git;rev=60cca6f8fe6b74a9fa2f670fcb885be2d3f9bcb9' i) Verify that devtool should create the recipe without error and expected SRC_URI is : SRC_URI = “https://github.com/repo.git” without “branch=“: SRC_URI = "git://github.com/shashwatpandey221091/bbexample.git;protocol=https" |