<?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>10163</bug_id>
          
          <creation_ts>2016-08-18 18:18:27 +0000</creation_ts>
          <short_desc>having a poky git checkout that mixes http and git: urls for remotes fails to build if it is a local project</short_desc>
          <delta_ts>2016-09-22 08:16:23 +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>Toaster</product>
          <component>toaster</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="brian avery">brian.avery</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>belen.barros.pena</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>michael.g.wood</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65319</commentid>
    <comment_count>0</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-08-18 18:18:27 +0000</bug_when>
    <thetext>Steps to reproduce:
have a poky checkout that looks like

origin  http://git.yoctoproject.org/git/poky (fetch)
origin  http://git.yoctoproject.org/git/poky (push)
poky-contrib    ssh://git@git.yoctoproject.org/poky-contrib (fetch)
poky-contrib    ssh://git@git.yoctoproject.org/poky-contrib (push)

---
git checkout -b toaster-next poky-contrib/toaster-next

---
make a local project and try to build something (quilt-native is about the fastest, btw).
The error is :

2016-08-18 11:03:01,047 ERROR runbuilds: Error launching build Existing git repository at /big/src/myBugs/poky, but with different remotes (&apos;origin     http://git.yoctoproject.org/git/poky (fetch), origin    http://git.yoctoproject.org/git/poky (push), poky-contrib      ssh://git@git.yoctoproject.org/poky-contrib (fetch), poky-contrib        ssh://git@git.yoctoproject.org/poky-contrib (push), &apos;, expected &apos;git://git.yoctoproject.org/poky&apos;). Toaster will not continue out of fear of damaging something.
Traceback (most recent call last):
  File &quot;/big/src/myBugs/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py&quot;, line 67, in schedule
    &quot;%d:%d&quot; % (br.pk, bec.be.pk))
  File &quot;/big/src/myBugs/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 255, in triggerBuild
    layers = self.setLayers(bitbake, layers, targets)
  File &quot;/big/src/myBugs/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 146, in setLayers
    raise BuildSetupException(&quot;Existing git repository at %s, but with different remotes (&apos;%s&apos;, expected &apos;%s&apos;). Toaster will not continue out of fear of damaging something.&quot; % (localdirname, &quot;, &quot;.join(localremotes.split(&quot;\n&quot;)), giturl))
bldcontrol.bbcontroller.BuildSetupException: Existing git repository at /big/src/myBugs/poky, but with different remotes (&apos;origin      http://git.yoctoproject.org/git/poky (fetch), origin     http://git.yoctoproject.org/git/poky (push), poky-contrib       ssh://git@git.yoctoproject.org/poky-contrib (fetch), poky-contrib       ssh://git@git.yoctoproject.org/poky-contrib (push), &apos;, expected &apos;git://git.yoctoproject.org/poky&apos;). Toaster will not continue out of fear of damaging something.
2016-08-18 11:03:02,065 DEBUG Saving error Existing git repository at /big/src/myBugs/poky, but with different remotes (&apos;origin http://git.yoctoproject.org/git/poky (fetch), origin    http://git.yoctoproject.org/git/poky (push), poky-contrib       ssh://git@git.yoctoproject.org/poky-contrib (fetch), poky-contrib       ssh://git@git.yoctoproject.org/poky-contrib (push), &apos;, expected &apos;git://git.yoctoproject.org/poky&apos;). Toaster will not continue out of fear of damaging something. (Project object failed)
Traceback (most recent call last):
  File &quot;./smoketests.py&quot;, line 142, in &lt;module&gt;
    raise Exception(&quot;ERROR: Build of {} failed.&quot;.format(args.target))
Exception: ERROR: Build of quilt-native failed.



---
This is the commit that started the regression:
33a4006529ca0e463f1e1fc95daef973a6facd3f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65321</commentid>
    <comment_count>1</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-08-18 18:30:08 +0000</bug_when>
    <thetext>This way works fine for local projects:
 git remote -v
contrib    git://git.yoctoproject.org/poky-contrib (fetch)
contrib    git://git.yoctoproject.org/poky-contrib (push)
origin    git://git.yoctoproject.org/poky (fetch)
origin    git://git.yoctoproject.org/poky (push)

The difference is whether the origin is http or git:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65322</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-08-18 18:38:14 +0000</bug_when>
    <thetext>This is because the local project is configured with the layers still as git repositories.

 &lt;object model=&quot;orm.layer&quot; pk=&quot;1&quot;&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;name&quot;&gt;openembedded-core&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;layer_index_url&quot;&gt;&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;vcs_url&quot;&gt;git://git.yoctoproject.org/poky&lt;/field&gt;
  &lt;/object&gt;
  &lt;object model=&quot;orm.layer_version&quot; pk=&quot;1&quot;&gt;
    &lt;field rel=&quot;ManyToOneRel&quot; to=&quot;orm.layer&quot; name=&quot;layer&quot;&gt;1&lt;/field&gt;
    &lt;field type=&quot;IntegerField&quot; name=&quot;layer_source&quot;&gt;0&lt;/field&gt;
    &lt;field rel=&quot;ManyToOneRel&quot; to=&quot;orm.release&quot; name=&quot;release&quot;&gt;2&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;branch&quot;&gt;HEAD&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;commit&quot;&gt;HEAD&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;dirpath&quot;&gt;meta&lt;/field&gt;
  &lt;/object&gt;

Maybe they should be local layers instead now. I guess this is where we find out why there were those mysterious magic strings in the previous config mechanism! (http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-poky/conf/toasterconf.json#n21).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66132</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-09-14 11:31:14 +0000</bug_when>
    <thetext>Please, review: https://lists.yoctoproject.org/pipermail/toaster/2016-September/005188.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66466</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-09-22 08:16:23 +0000</bug_when>
    <thetext>the fix has been merged into poky master</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>