<?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>1939</bug_id>
          
          <creation_ts>2012-01-30 06:05:03 +0000</creation_ts>
          <short_desc>Fully document SRC_URI and its various parameters</short_desc>
          <delta_ts>2012-09-19 21:36:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=abc32d85a7f241766d1fcc52a251249f2172ea89</bug_file_loc>
          <status_whiteboard>19 Sept 2012: Fixed/Resolved</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lauri Hintsala">lauri.hintsala</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>josh</cc>
    
    <cc>ke.yu</cc>
    
    <cc>nitin.a.kamble</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>18415</commentid>
    <comment_count>0</comment_count>
    <who name="Lauri Hintsala">lauri.hintsala</who>
    <bug_when>2012-01-30 06:05:03 +0000</bug_when>
    <thetext>SRC_URI patchdir parameter is not documented:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=4febd376ed5e64dd5e1b7050d3c970be1476441a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18463</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-02-02 08:06:31 +0000</bug_when>
    <thetext>Currently the glossary entry for SRC_URI is scant at best:

  &quot;The list of source files - local or remote.&quot;

We need a fuller description of this variable.  Fundamentally, I need the following:

  * Correct syntax
  * General use case
  * Weird things that need to be called out about it
  * Parameter descriptions... including &quot;patchdir&quot;

I tried to add Joshua Lock to the CC list as a resource for information but the tool could not find matches for joshua.lock@intel.com or joshua.lock@linux.intel.com.  Not quite sure what the problem is with that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18517</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-02-06 20:30:28 +0000</bug_when>
    <thetext>The SRC_URI tells the system which bits to pull in for the build and *how* to pull them in.

If the recipe only needs to fetch a tarball from the internet to build you&apos;ll see a single SRC_URI entry. If it needs to fetch a tarball, apply two patches and include a custom file you&apos;ll see 4 entries.

The first piece of the uri is the protocol - it tells BitBake which fetcher to use.

The available protocols are:

o file:// - fetches something from the local machine, usually a file shipped with the metadata. The path is relative to the FILESPATH variable so will search from the following directories, assumed to be a subdirectory of the directory with the recipe file in, in order:

${PF}, ${P}, ${PN}, ${BP}, ${BPN}, files and finally the same directory as the recipe itself.

Just in case those variables aren&apos;t documented in the Glossary:

PF - ${PN}-${EXTENDPE}${PV}-${PR} full package name including all version numbers i.e. eglibc-2.13-r20+svnr15508/ and
bash-4.2-r1/

P - ${PN}-${PV} i.e. bash-4.2

PN - package name i.e. bash-native, bash (note P includes the special suffix -native for native recipes, -cross for cross recipes, a multilib suffix for multilib recipes, etc).

BP - ${BPN}-${PV} base package and version (without special suffix)

BPN - base package name (without special suffix or version numbers)

o bzr:// - fetches from a bazaar revision control repository

o git:// - fetches from a git revision control repository

o osc:// - fetches from an OSC (OpenSuse Build service) revision control repository

o repo:// - fetches from a repo (git) repository

o svk:// - fetches from an svk revision control repository

o http:// https:// ftp:// - fetches files from the internet via http, ftp or https

o cvs:// - fetches from a CVS revision control repository

o hg:// - fetches from a mercurial (hg) revision control repository

o p4:// - fetches from a perforce (p4) revision control repository

o ssh:// - fetches files via a secure shell

o svn:// - fetches from a subversion (svn) revision control repository</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18518</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-02-06 20:31:23 +0000</bug_when>
    <thetext>Here are the options for patch SRC_URI entries:

Standard patch options:
apply - whether or not to apply the patch. Defaults to yes if not explicitly defined.
striplevel - what striplevel to use when applying the patch, defaults to 1 if not explicitly defined.

Patch options specific to recipes building code from a revision control system:
mindate - only apply patch if the SRCDATE is at least mindate
maxdate - only apply patch if the SRCDATE is not later than maxdate
minrev - only apply patch if the SRCREV is at least minrev
maxrev - only apply patch if the SRCREV is no later than maxrev
rev - only apply patch if SRCREV is rev
notrev - only apply patch if SRCREV isn&apos;t notrev</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18519</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-02-06 20:31:38 +0000</bug_when>
    <thetext>Some others worth noting:

* unpack - controls whether or not to unpack the file if it is an archive, 
defaults to yes

* subdir - place the file (or extract its contents) into the specified 
subdirectory of WORKDIR. Useful for unusual tarballs or other archives that 
don&apos;t have their files already in a subdirectory within the archive.

* name - a name to be used for association with SRC_URI checksums when you 
have more than one file specified in SRC_URI</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18520</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-02-06 20:32:25 +0000</bug_when>
    <thetext>Pasted in a few comments from a recent email thread on this topic, more info is required though...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18795</commentid>
    <comment_count>6</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-02-29 01:01:36 +0000</bug_when>
    <thetext>Adding Yu Ke to the bug. He implemented the fetcher2, and may have some design docs to help the documentation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24088</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2012-08-16 10:55:29 +0000</bug_when>
    <thetext>Hi Nintin,
Are there any updates for this bug?

Thanks,
Alex.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25421</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-09-19 20:32:54 +0000</bug_when>
    <thetext>I have added information about the fetch protocols and the SRC_URI options to the glossary definition.  You can see the final at http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25424</commentid>
    <comment_count>9</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-09-19 20:40:02 +0000</bug_when>
    <thetext>Scott,
  This also should be in the list of additional options

downloadfilename - specifies filename with which, the downloaded file should be stored.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25425</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-09-19 20:45:23 +0000</bug_when>
    <thetext>Nitin, 

I have added that option and reset the bug.  See at http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25427</commentid>
    <comment_count>11</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-09-19 21:36:10 +0000</bug_when>
    <thetext>Scott,
  The new addition looks good to me.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>