<?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>10405</bug_id>
          
          <creation_ts>2016-10-10 17:10:56 +0000</creation_ts>
          <short_desc>[bitbake] Missing SRC_URI &quot;path_spec&quot; option  for SVN fetcher</short_desc>
          <delta_ts>2017-03-16 18:35:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>BitBake User Manual</product>
          <component>bitbake-manual</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></bug_file_loc>
          <status_whiteboard>16 Mar 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karim">karim_atiki</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67095</commentid>
    <comment_count>0</comment_count>
    <who name="Karim">karim_atiki</who>
    <bug_when>2016-10-10 17:10:56 +0000</bug_when>
    <thetext>Hello,

I wrote a recipe to fetch code from the SVN repositories of our team.
The repo is structured in a wa, that each project has its own trunk, branches and tags subdirectory:

 + proj1
    ++ trunk

 + proj2
    ++ trunk

...
In the recipe file, I put the SRC_URI that way:

SRC_URI = &quot;svn://myrepos/proj1;module=trunk;protocol=http&quot;

But the content of the &quot;trunk&quot; was put directly into the directory:

i.e.
${SVNDIR}/myrepos/proj1/trunk/myfile.h
${SVNDIR}/myrepos/proj1/trunk/myfile.cpp
${SVNDIR}/myrepos/proj1/trunk/proj1.mak
...
But I was looking for the ability to have the following checkout:

${SVNDIR}/myrepos/proj1/myfile.h
${SVNDIR}/myrepos/proj1/myfile.cpp
${SVNDIR}/myrepos/proj1/proj1.mak

In the BitBake and Yocto MegaManual reference, I didn&apos;t find a keyword or option that I could use within SRC_URI.

Until I take a look to BitBake source-code and I found out in the svn.py that it as using the option &quot;path_spec&quot; to determine the output checkout directory.
But this option is not documented at all in the BitBake manual.

But changing my original SRC_URI made the things work correctly:

SRC_URI = &quot;svn://myrepos/proj1;module=trunk;protocol=http;path_spec=${ANOTHER_DIR}/proj1&quot;

Is it normal that this option is not documented ?
If so, would it possible to add it in the documentation ?
I guess I&apos;m not the only to fetch source code from SVN in a specific checkout-dir.

Cheers,

Karim</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67105</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-10-10 20:23:12 +0000</bug_when>
    <thetext>Thanks Karim...

Paul - Here is the SRC_URI variable description - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-SRC_URI.  Is this just a matter of documenting a &quot;missed&quot; option?

thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67117</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-11 02:08:15 +0000</bug_when>
    <thetext>Correct - however note that this parameter is specific to the svn fetcher. We should add this to the &quot;Subversion (SVN) Fetcher&quot; section of the bitbake manual. Note that this brings up two issues:

1) Bug 8909 - fetcher-specific documentation doesn&apos;t seem to have a place in the variable glossary. Maybe it&apos;s just a matter of adding one, but it seems to me the format used in the bitbake manual makes more sense for this level of detail.

2) The bitbake manual isn&apos;t part of the mega manual. It seems to me that parts of it should be - we might not want the whole thing due to the duplication of generic bitbake information e.g. the variable reference, but there are things like the fetcher documentation that seems to only be in the bitbake manual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67142</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-10-11 15:06:23 +0000</bug_when>
    <thetext>Thanks Paul, 

This is messy... I am going to not deal with it until 2.2 is out the door.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68120</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-11-08 17:33:50 +0000</bug_when>
    <thetext>Updated length of perfect days from 1 to 3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69915</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-01-18 23:30:43 +0000</bug_when>
    <thetext>Hi, 

The one thing I can do right now is document the &quot;path_spec&quot; option in the SVN fetcher section (http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#svn-fetcher).  But, I am confused between what are calling fetcher options and parameters.  In the current SVN Fetcher section, we list a bunch of parameters.  I can certainly put the &quot;path_spec&quot; option in there on its own after the parameters but that raises the question of are there other options we want to include?

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70288</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-01-31 16:32:04 +0000</bug_when>
    <thetext>Need response to Comment 5.  Moving to 2.3 M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70791</commentid>
    <comment_count>7</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-02-17 09:15:21 +0000</bug_when>
    <thetext>I don&apos;t know why this was assigned to me but I&apos;ll answer the best I can :) Assigning back to Scott. Please re-assign to me if you have further questions.

(In reply to comment #5)
&gt; The one thing I can do right now is document the &quot;path_spec&quot; option in the
&gt; SVN fetcher section
&gt; (http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-
&gt; manual.html#svn-fetcher).  But, I am confused between what are calling
&gt; fetcher options and parameters.

I didn&apos;t quite get this. I think all of th are called &apos;parameters&apos;, consistently. As they should. And, &apos;path_spec&apos; should be just an addition to the list of parameters


&gt; In the current SVN Fetcher section, we list
&gt; a bunch of parameters.  I can certainly put the &quot;path_spec&quot; option in there
&gt; on its own after the parameters but that raises the question of are there
&gt; other options we want to include?

I took a quick peek at the code and the &apos;date&apos; parameter is not actually supported by the svn backend anymore. It was dropped already six years ago by this commit:
http://git.openembedded.org/bitbake/commit/?id=9e6185fc17a8f7be8382bcd6d54dfe4aa5f0bed9
Thus, &apos;date&apos; parameter should be removed from the documentation as well.


The code looks somewhat broken and it seems that the documentation regarding the &apos;rsh&apos; parameter and protocol should be removed but I&apos;ll get back to this later, after I&apos;ve decrypted what the code should be doing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70840</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-02-20 18:39:22 +0000</bug_when>
    <thetext>Hi, 

I have attempted to update the SVN Fetcher section in the BitBake manual to address this bug.  First, I removed the &quot;date&quot; parameter from both the list of parameters and the examples at the end of the section.  I was unsure on the whole  &quot;rsh&quot; business in the &quot;protocol&quot; parameter so I left that untouched and you can clarify that for me.  I was not sure if just the &quot;rsh&quot; part was supposed to be removed or the whole &quot;protocol&quot; parameter.  So, I left it as is. 

Secondly, I added the &quot;path_spec&quot; parameter.  Please look over the simple explanation and tell me if we need more detail.  I did add a third example at the end of the section that uses the &quot;path_spec&quot; parameter.  Notice also that I made the three examples consistent with what I saw for syntax in the comments here in the bug.  

Regarding the other comments about duplicating fetcher-specific information into the ref-manual... I did not address that.  We probably need more discussion on that.  

Here is the area to look.. let me know.  http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#svn-fetcher

thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70857</commentid>
    <comment_count>9</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-02-21 15:02:44 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Hi, 
&gt; 
&gt; I have attempted to update the SVN Fetcher section in the BitBake manual to
&gt; address this bug.  First, I removed the &quot;date&quot; parameter from both the list
&gt; of parameters and the examples at the end of the section.

Good.


&gt; I was unsure on
&gt; the whole  &quot;rsh&quot; business in the &quot;protocol&quot; parameter so I left that
&gt; untouched and you can clarify that for me.  I was not sure if just the &quot;rsh&quot;
&gt; part was supposed to be removed or the whole &quot;protocol&quot; parameter.  So, I
&gt; left it as is.

Let&apos;s keep it as it is, for a while. I have a bitbake patch under review that tries to clarify the functionality. Let&apos;s get back to this when that patch gets merged (or rejected).


&gt; Secondly, I added the &quot;path_spec&quot; parameter.  Please look over the simple
&gt; explanation and tell me if we need more detail. 

The level of detail should be enough, I think. However, the explanation is a bit misleading in that it talks about &quot;source file&quot; although it should be about the svn module. A better wording could be something like:
&quot;A specific directory in which to checkout the specified svn module.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70929</commentid>
    <comment_count>10</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-02-24 14:00:53 +0000</bug_when>
    <thetext>My patch for svn fetcher was merge:
http://git.openembedded.org/bitbake/commit/?id=5b364b02270b0d7c2b7ca8d67fa2731bf93720ee

Now the documentation should be changed, accordingly. All references to &apos;rsh&apos; should be removed, and, a new &apos;ssh&apos; parameter should be added. 

You could use something like (you probably find better wording):
- &quot;protocol&quot;: The protocol to use, which defaults to &quot;svn&quot;. If &quot;protocol&quot; is set to &quot;svn+ssh&quot; the &quot;ssh&quot; parameter is also used.
- &quot;ssh&quot;: An optional parameter used when &quot;protocol&quot; is set to &quot;svn+ssh&quot;. May be used to specify the ssh program used by svn.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70990</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-02-28 18:21:15 +0000</bug_when>
    <thetext>Markus, 

I changed the &quot;path_spec&quot; description to &quot;A specific directory in which to checkout the specified svn module.&quot; as suggested.  See http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#svn-fetcher.

New entry in the list for &quot;ssh&quot; has been added to the list. 

Updated the &quot;protocol&quot; description.  Your wording was fine -- just added a comment after the opening clause.  See the same list.

For the &quot;method&quot; description, an occurrence of &quot;rsh&quot; existed as follows: &quot;If &quot;method&quot; is set to &quot;ext&quot;, BitBake examines the &quot;rsh&quot; parameter and sets CVS_RSH.&quot; I completely removed that sentence leaving the bit about &quot;dir&quot;.  That occurrence of &quot;rsh&quot; was the only one in the SVN Fetcher.  There is on in the CVS Fetcher.  I assume I leave that one?

All changes in.  Let me know if there are any problems.

http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#svn-fetcher

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71005</commentid>
    <comment_count>12</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-03-01 07:32:08 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; I changed the &quot;path_spec&quot; description to &quot;A specific directory in which to
&gt; checkout the specified svn module.&quot; as suggested.  See
&gt; http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.
&gt; html#svn-fetcher.
&gt; 
&gt; New entry in the list for &quot;ssh&quot; has been added to the list. 
&gt; 
&gt; Updated the &quot;protocol&quot; description.  Your wording was fine -- just added a
&gt; comment after the opening clause.  See the same list.
&gt; 
&gt; For the &quot;method&quot; description, an occurrence of &quot;rsh&quot; existed as follows: &quot;If
&gt; &quot;method&quot; is set to &quot;ext&quot;, BitBake examines the &quot;rsh&quot; parameter and sets
&gt; CVS_RSH.&quot; I completely removed that sentence leaving the bit about &quot;dir&quot;. 
&gt; That occurrence of &quot;rsh&quot; was the only one in the SVN Fetcher.  There is on
&gt; in the CVS Fetcher.  I assume I leave that one?

AFAIU, the sentence you removed (If &quot;method&quot; is set to &quot;ext&quot;...) was actually under CVS fetcher documentation and should not have been removed. The &quot;rsh&quot; parameter is totally valid there.

So please re-add the part describing the &quot;rsh&quot; parameter under the CVS fetcher. Otherwise, looks good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71020</commentid>
    <comment_count>13</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-01 15:16:28 +0000</bug_when>
    <thetext>Markus, 

That was a goof on my part.  I put that back in.  Sorry about that.  So I think we are good now. http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#cvs-fetcher.

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71025</commentid>
    <comment_count>14</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-03-01 20:31:30 +0000</bug_when>
    <thetext>OK :) Looks good to me, now</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71370</commentid>
    <comment_count>15</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-16 18:35:38 +0000</bug_when>
    <thetext>Hi, 

Setting this bug to RESOLVED and putting the doc flag to &quot;done.&quot;

Thanks,
Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>