<?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>7945</bug_id>
          
          <creation_ts>2015-07-02 11:14:31 +0000</creation_ts>
          <short_desc>Toaster startup script assumes it&apos;s in a git repository</short_desc>
          <delta_ts>2017-06-27 01:56:07 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>Future</target_milestone>
          <dependson>7963</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Wood">michael.g.wood</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bluelightning</cc>
    
    <cc>brian.avery</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>dl9pf</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>richard.purdie</cc>
          
          
          <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>52097</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-07-02 11:14:31 +0000</bug_when>
    <thetext>The toaster startup script assumes it&apos;s inside a git repository, when loading the toasterconf.json this is called:

 def _read_git_url_from_local_repository(address):
            url = None
            # we detect the remote name at runtime
            import subprocess
            (remote, remote_name) = address.split(&quot;:&quot;, 1)
            cmd = subprocess.Popen(&quot;git remote -v&quot;, shell=True, cwd = os.path.dirname(filepath), stdout=subprocess.PIPE, stderr = subprocess.PIPE)

in bitbake/lib/toaster/bldcontrol/loadconf.py:11


This means that if you download a poky release tar archive Toaster will be unable to be configured/start.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52103</commentid>
    <comment_count>1</comment_count>
    <who name="Jan-Simon Moeller">dl9pf</who>
    <bug_when>2015-07-02 14:08:02 +0000</bug_when>
    <thetext>This applies to the &quot;Build Mode&quot;.  
The simple &quot;Analysis Mode&quot; still works with the tarball.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52175</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-07-07 14:56:16 +0000</bug_when>
    <thetext>The root cause is that the toasterconf.json file we supply by default references the local git url under which it is cloned. If the toasterconf.json is not cloned from GIT, toaster properly detects this, but throws an indescribable error message which doesn&apos;t tell the user.

The patch at 

https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=adamian/20150707_bugs

replaces throwing out exception with properly documented error messages.


Bug 7963 tracks infrastructure changes needed for tarball generation to generate valid sources.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52178</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-07-07 15:56:25 +0000</bug_when>
    <thetext>Could we simply fall back within the Toaster code to a copy rather than a clone if the source isn&apos;t a git repository?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52180</commentid>
    <comment_count>4</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-07-07 16:04:59 +0000</bug_when>
    <thetext>Toaster code deals in layers hosted in Git repos.

The fallback you mention requires either:
- creating a on-the-fly git repo out of the tarball; the way an automated repo would work is sketchy, at best, and a hack at worst

- rewrite checkout code for Toaster to use layers outside git repos; this brings in multiple problems related to releases - there is no way to differentiate master to fido, e.g. outside a git branch; i.e. projects created from tarball sources would work in very different ways from projects using git repos; significant implementation work is needed here</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52231</commentid>
    <comment_count>5</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2015-07-09 10:42:42 +0000</bug_when>
    <thetext>Changed the documentation status. Since the proper fix for this issue depends on bug 6683 and bug 7963, all we can do for the moment, on top of improving the error message, is updating the 1.8 manual in the Yocto Project website to let people know that, in order to use the build functionality, they need to clone the Yocto Project repository, not download the release tarball.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74223</commentid>
    <comment_count>6</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-06-15 15:16:32 +0000</bug_when>
    <thetext>Is this still broken? if so, is Bug 6683 still the right way to fix it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74234</commentid>
    <comment_count>7</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-06-15 15:50:03 +0000</bug_when>
    <thetext>removing Bug 6683 as it is no longer relevant to toaster setup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74559</commentid>
    <comment_count>8</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-06-27 01:56:07 +0000</bug_when>
    <thetext>The current Toaster code now allows &quot;git remote -v&quot; for Toaster to be optional. 

If present, the tracked repositories are cached and used to skip a git pull, otherwise a git pull is executed.

See &quot;localhostbecontroller.py&quot; in the method &quot;setLayers()&quot;.

FYI, here are the typical values for a Toaster development pull:
  [build]$ git remote -v
  origin	git://git.yoctoproject.org/poky (fetch)
  origin	git://git.yoctoproject.org/poky (push)
  poky-contrib	ssh://git@git.yoctoproject.org/poky-contrib (fetch)
  poky-contrib	ssh://git@git.yoctoproject.org/poky-contrib (push)
  [build]$ 

I am marking this defect as obsolete.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>