<?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>6258</bug_id>
          
          <creation_ts>2014-05-01 02:01:15 +0000</creation_ts>
          <short_desc>svn fetch uses last changed revision instead of revision on a svn branch.</short_desc>
          <delta_ts>2021-09-22 08:34:00 +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>BitBake</product>
          <component>bitbake</component>
          <version>1.5.1</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></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Balagopal Ambalakkat">bambalakkat</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>wenlin.kang</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43077</commentid>
    <comment_count>0</comment_count>
    <who name="Balagopal Ambalakkat">bambalakkat</who>
    <bug_when>2014-05-01 02:01:15 +0000</bug_when>
    <thetext>.../qfx/build/qfx/bitbake_build  $ bitbake --version
BitBake Build Tool Core version 1.20.0, bitbake version 1.20.0
.../qfx/build/qfx/bitbake_build  $ 

When you create a SVN branch , the last changed revision exist only on the parent branch or trunk. so the svn fetch fails

I had a svn trunk

Path: .
Working Copy Root Path: /home/ambalakkat/svn/yocto-src
URL: http://pkg.dcbg.juniper.net/fsgtools/yocto/trunk/yocto-src/qfx/initscripts
Repository Root: http://pkg.dcbg.juniper.net/fsgtools/yocto
Repository UUID: 33bd5da9-22e9-4ec1-aba5-5ffc8ebe5f2c
Revision: 73
Node Kind: directory
Schedule: normal
Last Changed Author: sbalraj
Last Changed Rev: 71
Last Changed Date: 2014-04-29 13:26:17 -0700 (Tue, 29 Apr 2014)



~/svn/yocto-src  $ 

I created a branch PVT_AMBALAKKAT_BRANCH from the trunk

Path: .
Working Copy Root Path: /home/ambalakkat/test/initscripts
URL: http://pkg.dcbg.juniper.net/fsgtools/yocto/branches/PVT_AMBALAKKAT_BRANCH/yocto-src/qfx/initscripts
Repository Root: http://pkg.dcbg.juniper.net/fsgtools/yocto
Repository UUID: 33bd5da9-22e9-4ec1-aba5-5ffc8ebe5f2c
Revision: 75
Node Kind: directory
Schedule: normal
Last Changed Author: sbalraj
Last Changed Rev: 71
Last Changed Date: 2014-04-29 13:26:17 -0700 (Tue, 29 Apr 2014)


Failed with error during fetch
| 
| WARNING: Fetcher failure: Fetch command failed with exit code 1, output:
| svn: E170000: URL &apos;http://pkg.dcbg.juniper.net/fsgtools/yocto/branches/PVT_AMBALAKKAT_BRANCH/yocto-src/qfx/initscripts&apos; doesn&apos;t exist
| 
| DEBUG: Python function base_do_fetch finished
| DEBUG: Python function do_fetch finished
| ERROR: Function failed: Fetcher failure for URL: &apos;svn://pkg.dcbg.juniper.net/fsgtools/yocto/branches/PVT_AMBALAKKAT_BRANCH;module=yocto-src/qfx/initscripts;protocol=http&apos;. Unable to fetch URL from any source.
ERROR: Task 0 (/mnt/ambalakkat-hd/workspace/wrlinux/qfx/layers/meta-qfx/recipes-qfx/platform-scripts/platform-scripts_0.1.bb, do_fetch) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 236 tasks of which 235 didn&apos;t need to be rerun and 1 failed.


The bitbake picks &quot;Last Changed Rev: 71&quot; when SRC_REV is $(AUTOREV) for SRC_URI and then the fetch fails.

The rev 71 exist only on the trunk not on the branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43204</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-05-08 23:39:36 +0000</bug_when>
    <thetext>Can you provide an external SVN server that exibits this behavior along with a 
recipe example that recplicates this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44073</commentid>
    <comment_count>2</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2014-06-18 17:45:15 +0000</bug_when>
    <thetext>Assigned to person we are requesting info from per RP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44089</commentid>
    <comment_count>3</comment_count>
      <attachid>2011</attachid>
    <who name="vallen">wenlin.kang</who>
    <bug_when>2014-06-19 06:24:12 +0000</bug_when>
    <thetext>Created attachment 2011
The patch fix Unable to fetch URL bug

Follow the testing steps and instructions:

First, we need to create a svn server on the server side, eg, my is svnroot
$svnadmin create ~/workspace/svnroot

Second, on the client side:
$mkdir -p ~/workspace/svntest
$cd ~/workspace/svntest
$mkdir -p test/{trunk,branches,tag}
$mkdir -p test/trunk/tdir0/tdir1/tdir2
$touch test/trunk/hello.c
$touch test/trunk/tdir0/tdir1/tdir2/test2.c
$touch test/trunk/tdir0/tdir1/test1.c
$touch test/trunk/tdir0/test0.c

$svn import -m &quot;create the project test&quot; test/ svn://xxx.xxx.xxx.xxx/svnroot/test

Then, make some commit,...
Such, we now get &quot;r15&quot;

$svn cp -m &quot;create a branch test_debug-1.0&quot; svn://xxx.xxx.xxx.xxx/svnroot/test/trunk svn://xxx.xxx.xxx.xxx/svnroot/test/branches/test_debug-1.0

Now, we need to create a bb file(eg,mytest.bb) to download &quot;tdir1&quot; with the verion &lt; test_debug-1.0 created time version,
eg, download r12, then in bb file has:

SRCREV = &quot;12&quot;
SRC_URI = &quot;svn://xxx.xxx.xxx.xxx/svnroot/test/branches/test_debug-1.0;module=tdir0/tdir1&quot;

Last, run fetch for mytest.bb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44090</commentid>
    <comment_count>4</comment_count>
    <who name="vallen">wenlin.kang</who>
    <bug_when>2014-06-19 06:30:19 +0000</bug_when>
    <thetext>I have made the patch, and add the steps and instructions to test, please see the mailing list:
http://patches.openembedded.org/patch/73099/
or
http://patchwork.openembedded.org/patch/73595/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44142</commentid>
    <comment_count>5</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2014-06-23 18:00:25 +0000</bug_when>
    <thetext>It appears that the information requested has been supplied and this should no longer be in NEEDINFO.  I have moved it to In Process Review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45809</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-09-24 18:10:47 +0000</bug_when>
    <thetext>I did some research into this. The issue comes from the change:

http://git.openembedded.org/bitbake/commit/lib/bb/fetch/svn.py?id=42e57e467b8334230436f24dc4bdfff64b52d2b3

I&apos;m having a hard time figuring out what the correct thing to do here is though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91483</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-09-20 20:41:09 +0000</bug_when>
    <thetext>I&apos;ve ended up adding a nopegrevision parameter which can be used in urls to choose the correct behaviour as there is no one correct answer that will work in every case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91492</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-09-22 08:34:00 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c4fa4f9735b66d706c4545e6b37ba3fb3aaf296e</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2011</attachid>
            <date>2014-06-19 06:24:12 +0000</date>
            <delta_ts>2014-06-19 06:24:12 +0000</delta_ts>
            <desc>The patch fix Unable to fetch URL bug</desc>
            <filename>0001-fetch2-svn.py-fix-Unable-to-fetch-URL-bug.patch</filename>
            <type>text/plain</type>
            <size>1344</size>
            <attacher name="vallen">wenlin.kang</attacher>
            
              <data encoding="base64">RnJvbSBiNDE1OGU0OGI2ZThlYWZhNWU4M2ZhNzJkNzRlNTA0Y2JhZjhhZjgyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBXZW5saW4gS2FuZyA8d2VubGluLmthbmdAd2luZHJpdmVyLmNv
bT4KRGF0ZTogVHVlLCAzIEp1biAyMDE0IDA5OjQ1OjQwICswODAwClN1YmplY3Q6IFtQQVRDSF0g
ZmV0Y2gyL3N2bi5weTogZml4IFVuYWJsZSB0byBmZXRjaCBVUkwgYnVnCgpGb3Igc3ZuIHNvdXJj
ZSwgd2hlbiBkb3dubG9hZCBhIHJldnNpb24gb24gYnJhbmNoZXMsIGlmIHRoZSBkb3dubG9hZApy
ZXZzaW9uIDwgdGhlIGJyYW5jaCBjcmVhdGVkIHRpbWUgcmV2c2lvbiwgdGhlbiBpdCB3aWxsIGZh
aWwuCgpUaGUgZGV0YWlsIGRlc2NyaXB0aW9uIHJlZmVyZW5jZSB0aGUgWW9jdG8gUHJvamVjdCBi
dWd6aWxsYSwgcGxlYXNlIHNlZToKaHR0cHM6Ly9idWd6aWxsYS55b2N0b3Byb2plY3Qub3JnL3No
b3dfYnVnLmNnaT9pZD02MjU4CgpTaWduZWQtb2ZmLWJ5OiBXZW5saW4gS2FuZyA8d2VubGluLmth
bmdAd2luZHJpdmVyLmNvbT4KLS0tCiBsaWIvYmIvZmV0Y2gyL3N2bi5weSB8ICAgIDMgKystCiAx
IGZpbGUgY2hhbmdlZCwgMiBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0
IGEvbGliL2JiL2ZldGNoMi9zdm4ucHkgYi9saWIvYmIvZmV0Y2gyL3N2bi5weQppbmRleCA4ODQ3
NDYxLi43NWUyMWRmIDEwMDY0NAotLS0gYS9saWIvYmIvZmV0Y2gyL3N2bi5weQorKysgYi9saWIv
YmIvZmV0Y2gyL3N2bi5weQpAQCAtOTgsNyArOTgsOCBAQCBjbGFzcyBTdm4oRmV0Y2hNZXRob2Qp
OgogICAgICAgICAgICAgc3VmZml4ID0gIiIKICAgICAgICAgICAgIGlmIHVkLnJldmlzaW9uOgog
ICAgICAgICAgICAgICAgIG9wdGlvbnMuYXBwZW5kKCItciAlcyIgJSB1ZC5yZXZpc2lvbikKLSAg
ICAgICAgICAgICAgICBzdWZmaXggPSAiQCVzIiAlICh1ZC5yZXZpc2lvbikKKyAgICAgICAgICAg
ICAgICAjZm9sbG93IHRoaXMgbGluZSBjYW4gbWFrZSB0aGUgZmV0Y2ggZmFpbCB3aGVuIGRvd25s
b2FkIGEgcmV2c2lvbiBvbiBicmFuY2hlcyBpZiB0aGUgZG93bmxvYWQgcmV2c2lvbiA8IHRoZSBi
cmFuY2ggY3JlYXRlZCB0aW1lIHJldnNpb24uCisgICAgICAgICAgICAgICAgI3N1ZmZpeCA9ICJA
JXMiICUgKHVkLnJldmlzaW9uKQogCiAgICAgICAgICAgICBpZiBjb21tYW5kID09ICJmZXRjaCI6
CiAgICAgICAgICAgICAgICAgc3ZuY21kID0gIiVzIGNvICVzICVzOi8vJXMvJXMlcyAlcyIgJSAo
dWQuYmFzZWNtZCwgIiAiLmpvaW4ob3B0aW9ucyksIHByb3RvLCBzdm5yb290LCB1ZC5tb2R1bGUs
IHN1ZmZpeCwgdWQubW9kdWxlKQotLSAKMS43LjkuNQoK
</data>

          </attachment>
      

    </bug>

</bugzilla>