<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11389</bug_id>
          
          <creation_ts>2017-04-20 02:58:10 +0000</creation_ts>
          <short_desc>devtool: add: automatically set branch for git URLs if not master</short_desc>
          <delta_ts>2017-10-09 03:05:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M3</target_milestone>
          
          <blocked>11393</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Rebecca Chang">rebecca.swee.fun.chang</assigned_to>
          <cc>brianx.j.kurle</cc>
    
    <cc>ee.peng.yeoh</cc>
    
    <cc>ross.burton</cc>
    
    <cc>shashwatx.pandey</cc>
    
    <cc>wmills</cc>
          
          <qa_contact name="Shashwat Pandey">shashwatx.pandey</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72693</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-04-20 02:58:10 +0000</bug_when>
    <thetext>If devtool add is run on a git URL and a revision is specified that is not on master, and branch= isn&apos;t already in the URL, then get the correct branch and add it to the URL. If the revision isn&apos;t on a branch, and it&apos;s not already there, add nobranch=1 to the URL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73500</commentid>
    <comment_count>1</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-05-25 09:37:36 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73514</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-05-25 20:23:57 +0000</bug_when>
    <thetext>That&apos;s a good point. If the revision is on multiple branches, and we&apos;ve already checked that one of them isn&apos;t master, then yes I don&apos;t think we have much choice but to error out telling the user they need to select one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74988</commentid>
    <comment_count>3</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-07-13 04:49:53 +0000</bug_when>
    <thetext>Submitted fix to mailing list.
http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139574.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75533</commentid>
    <comment_count>4</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-08-01 02:29:36 +0000</bug_when>
    <thetext>Patches are now staging at mut branch. Moving this to M3 as it has already overdue for M2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75942</commentid>
    <comment_count>5</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-08-17 05:36:49 +0000</bug_when>
    <thetext>v2 patch series fixed comment from Chris:
http://lists.openembedded.org/pipermail/openembedded-core/2017-August/140860.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76074</commentid>
    <comment_count>6</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-08-23 08:02:07 +0000</bug_when>
    <thetext>OE-Core rev: ecca596b75cfda2f798a0bdde75f4f774e23a95b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77453</commentid>
    <comment_count>7</comment_count>
    <who name="Shashwat Pandey">shashwatx.pandey</who>
    <bug_when>2017-10-09 03:05:30 +0000</bug_when>
    <thetext>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 &apos;https://github.com/epyeoh/bbexample.git;rev=f26a5d9e53524edc72b9f476a628c35eb82e497b&apos;

c) 	Verify that the correct branch is added to the SRC_URI:

	SRC_URI = &quot;git://github.com/epyeoh/bbexample.git;protocol=https;branch=dev1&quot;

d) 	Scenario2: If the revision is on multiple branches, and none of them is master:
	Perform devtool add bbexample &apos;https://github.com/epyeoh/bbexample.git;rev=a1e995ea27eb2e800cee1fc7b37672116aee2305&apos;

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 &apos;script -e -q -c &quot;recipetool --color=always create --devtool -o /tmp/devtoolvnmzcrd_ &apos;https://github.com/epyeoh/bbexample.git;rev=a1e995ea27eb2e800cee1fc7b37672116aee2305&apos;  -x /workdir/build/workspace/sources/devtoolsrcqsb05ogk -N bbexample&quot; /dev/null&apos; failed

f) 	Scenario3: If the revision is on multiple branch and branch is specified:
	Perform  devtool add bbexample &apos;https://github.com/epyeoh/bbexample.git;rev=a1e995ea27eb2e800cee1fc7b37672116aee2305;branch=dev3&apos;

g) 	Verify that the correct branch is added to the SRC_URI:

	SRC_URI = &quot;git://github.com/epyeoh/bbexample.git;branch=dev3;protocol=https&quot;

h) 	Scenario4: If the revision is on multiple branch and one of them is master:
	Perform devtool add bbexample &apos;https://github.com/shashwatpandey221091/bbexample.git;rev=60cca6f8fe6b74a9fa2f670fcb885be2d3f9bcb9&apos;

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 = &quot;git://github.com/shashwatpandey221091/bbexample.git;protocol=https&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>