<?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>9200</bug_id>
          
          <creation_ts>2016-03-02 18:13:52 +0000</creation_ts>
          <short_desc>we are disabling file based git urls in imported (actually all) layers</short_desc>
          <delta_ts>2016-05-05 11:16:22 +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.1</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>normal</bug_severity>
          <target_milestone>2.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="brian avery">brian.avery</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>michael.g.wood</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>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59634</commentid>
    <comment_count>0</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-03-02 18:13:52 +0000</bug_when>
    <thetext>In localhostcontroller.py we are skipping the clone for all layers that have a giturl of file:///&lt;local file path&gt;

This makes it impossible to have a local layer that you want to import unless you push it to somewhere web accessible.  This is an unnecessary restriction.
The fix:
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -129,8 +129,8 @@ class LocalhostBEController(BuildEnvironmentController):
 
         for layer in layers:
             # we don&apos;t process local URLs
-            if layer.giturl.startswith(&quot;file://&quot;):
-                continue
+            #if layer.giturl.startswith(&quot;file://&quot;):
+            #    continue
             if not (layer.giturl, layer.commit) in gitrepos:
                 gitrepos[(layer.giturl, layer.commit)] = []
             gitrepos[(layer.giturl, layer.commit)].append( (layer.name, layer.dirpath) )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59635</commentid>
    <comment_count>1</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-03-02 18:15:46 +0000</bug_when>
    <thetext>michaelw suggested that we verify rechability when we do the import by doing:
git ls-remote &lt;giturl&gt; which would work for both local and remote vcs.  This is a good way to make sure there&apos;s not a typo in a long url.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59663</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-03-03 11:47:27 +0000</bug_when>
    <thetext>in the xhr_importlayer function we could add a non blocking validation condition which depends on the results of git ls-remote returning info for a valid git repo.

related to bug #8429</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59665</commentid>
    <comment_count>3</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-03-03 11:54:35 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; in the xhr_importlayer function we could add a non blocking validation
&gt; condition which depends on the results of git ls-remote returning info for a
&gt; valid git repo.
&gt; 
&gt; related to bug #8429

I agree this is a good feature, as long as the command doesn&apos;t block users from interacting with Toaster while running: you should be free to continue using Toaster after we issue the command and while we are waiting for its outcome. Once we get the results, we show them in the UI. 

I think this should go as a separate feature, or be done as part of bug 8429.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59686</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-03-03 17:13:07 +0000</bug_when>
    <thetext>michaelw/toaster/localhostbctrl</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59701</commentid>
    <comment_count>5</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-03-03 18:19:38 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; michaelw/toaster/localhostbctrl

I was able to build my imported layer with this branch, both with 

file:///home/belen/ypdd-adv-layer

and 

/home/belen/ypdd-adv-layer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59704</commentid>
    <comment_count>6</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-03-03 21:31:44 +0000</bug_when>
    <thetext>michael, if you send a review req to the list for the michaelw/toaster/localhostbctrl I can upstream it tomoro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60376</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-03-24 11:22:31 +0000</bug_when>
    <thetext>This commit has landed

http://git.yoctoproject.org/cgit/cgit.cgi/poky/atom/b60c9943bff4448be5768e095b67bc4a291414ef
We don&apos;t need to skip file:/// uri type locations for git repositories.
If you&apos;re using a file:/// uri you should know that it has to be a local
path.

[YOCTO #9200]

igned-off-by: Michael Wood &lt;michael.g.wood@intel.com&gt;
(Bitbake rev: 4d0e5804103c2d98d038b3c490cac37a73f3cc47)

Signed-off-by: Elliot Smith &lt;elliot.smith@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

Bug link: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9200
gitweb: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b60c9943bff4448be5768e095b67bc4a291414ef</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61976</commentid>
    <comment_count>8</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2016-05-05 11:16:22 +0000</bug_when>
    <thetext>Verified on master.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>