<?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>8463</bug_id>
          
          <creation_ts>2015-10-08 11:03:06 +0000</creation_ts>
          <short_desc>toaster looks into the wrong directories for already cloned layers</short_desc>
          <delta_ts>2015-11-10 13:43:18 +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.0</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>major</bug_severity>
          <target_milestone>2.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Wood">michael.g.wood</reporter>
          <assigned_to name="Michael Wood">michael.g.wood</assigned_to>
          <cc>alexandru.costinx.roman</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>55063</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-10-08 11:03:06 +0000</bug_when>
    <thetext>Due to the change in layer location/checkout name we get an exception on starting the build because the cloned layer location is wrong.

  File &quot;/home/michael/toaster/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 362, in triggerBuild
    self.setLayers(bitbake, layers, targets)
  File &quot;/home/michael/toaster/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 256, in setLayers
    self._shellcmd(&quot;git clone \&quot;%s\&quot; \&quot;%s\&quot;&quot; % (cached_layers[giturl], localdirname))
  File &quot;/home/michael/toaster/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 69, in _shellcmd
    raise ShellCmdException(err)
ShellCmdException: command: git clone &quot;/home/michael/toaster/poky/scripts&quot; &quot;/home/michael/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_fido&quot; 
fatal: repository &apos;/home/michael/toaster/poky/scripts&apos; does not exist

cached layers generated is: 
{&apos;git://git.yoctoproject.org/poky-contrib&apos;: u&apos;/home/michael/toaster/poky/scripts&apos;, &apos;git://git.yoctoproject.org/poky&apos;: u&apos;/home/michael/toaster/poky/scripts&apos;}

As you can see the directory that it is picking up the checkout in is not the top level directory and so the clone fails.

As toaster makes use of clones of itself we have a mechanism to just clone the current checkout and use that as a basis for the git clone for the layers inside. For instance in poky if we&apos;re running in that directory we don&apos;t ever want to change the current checkout so we make a copy of ourselves to do this work in. This step is cached_layers and previously traversed through directories inside the current checkout to find any pre-existing checkouts. This was ending up traversing too many directories down so remove the traverse and only deal with the current directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55511</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-10-20 14:19:00 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e35c404537db0b46047fcb2ee7d3645e3e0935c5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56355</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2015-11-10 13:43:18 +0000</bug_when>
    <thetext>Verified on master: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>