<?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>2258</bug_id>
          
          <creation_ts>2012-04-06 22:20:40 +0000</creation_ts>
          <short_desc>Fallback mirrors are not defaulted to if SRC_URI uses an existing mirror in it already</short_desc>
          <delta_ts>2012-04-11 16:29:16 +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>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(1.2) Needs Triage</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>poky.bs.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>20025</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2012-04-06 22:20:40 +0000</bug_when>
    <thetext>I ran into this issue when I cleaned up apt tars from DL_DIR and upstream has removed the tars from debian mirror Note I am using OE-Core/distroless so things might be different with Poky since it might be using different mirror groking policy

SRC_URI for apt is like this

SRC_URI = &quot;${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz 

and recipe we have is for 0.7.14 and apt_0.7.14.tar.gz has been deleted from debian mirror

even though OE-Core uses downloads.yoctoproject.org as fallback mirror
fetcher really does not fall back to it in this case.

If I remove ${DEBIAN_MIRROR} above and use a hard coded location then it does
the expected where it goes there and finds the tar is missing and falls back
to yp.org location.

I think this could be a problem for large set of recipes which use some sort
of mirrors in SRC_URI as we maintain a branch for longer time this problem
could arise on those long term branches more and more since the recipes wont
be upgraded on the maintenance branches</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20155</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-04-10 22:53:00 +0000</bug_when>
    <thetext>I just attempted do duplicate this with oe-core and bitbake master (bare, not poky), and the fetch succeeded.

Here&apos;s the output from bitbake apt -c fetch, note I did add in a warning to show the url rewrite.

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 1 (ID: 0, /intel/poky/oe-core/meta/recipes-devtools/apt/apt_0.7.14.bb, do_fetch)
NOTE: package apt-0.7.14-r11: task do_fetch: Started
WARNING: Failed to fetch URL ftp://ftp.debian.org/debian/pool/main/a/apt/apt_0.7.14.tar.gz
WARNING: OrigUd: &lt;bb.fetch2.FetchData object at 0x81535d0&gt; Newuri: http://snapshot.debian.net/archive/pool/a/apt/apt_0.7.14.tar.gz
NOTE: package apt-0.7.14-r11: task do_fetch: Succeeded
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn&apos;t need to be rerun and all succeeded.

Summary: There were 2 WARNING messages shown.

If you can give me any additional information on how to reproduce this, that would be great.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20156</commentid>
    <comment_count>2</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2012-04-10 23:16:36 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I just attempted do duplicate this with oe-core and bitbake master (bare, not
&gt; poky), and the fetch succeeded.
&gt; 
&gt; Here&apos;s the output from bitbake apt -c fetch, note I did add in a warning to
&gt; show the url rewrite.
&gt; 
&gt; NOTE: Resolving any missing task queue dependencies
&gt; NOTE: Preparing runqueue
&gt; NOTE: Executing RunQueue Tasks
&gt; NOTE: Running task 1 of 1 (ID: 0,
&gt; /intel/poky/oe-core/meta/recipes-devtools/apt/apt_0.7.14.bb, do_fetch)
&gt; NOTE: package apt-0.7.14-r11: task do_fetch: Started
&gt; WARNING: Failed to fetch URL
&gt; ftp://ftp.debian.org/debian/pool/main/a/apt/apt_0.7.14.tar.gz
&gt; WARNING: OrigUd: &lt;bb.fetch2.FetchData object at 0x81535d0&gt; Newuri:
&gt; http://snapshot.debian.net/archive/pool/a/apt/apt_0.7.14.tar.gz
&gt; NOTE: package apt-0.7.14-r11: task do_fetch: Succeeded
&gt; NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn&apos;t need to be rerun and
&gt; all succeeded.
&gt; 
&gt; Summary: There were 2 WARNING messages shown.
&gt; 
&gt; If you can give me any additional information on how to reproduce this, that
&gt; would be great.

interesting. I have this
DL_DIR ?= &quot;${TOPDIR}/../../downloads&quot;

in local.conf which is not normal otherwise all seems usual suspects in local.conf. Let me see if I can reproduce it again tomorrow. I am pretty sure
it never fetched it unless I removed ${DEBIAN_MIRROR} it bailed out without
falling back to yp.org
in your case its finding it on http://snapshot.debian.net/archive/pool/a/apt/apt_0.7.14.tar.gz 

may be when I ran into the issue the tar was in flux where it disappeared from main mirrors but took sometime to appear on snapshot debian mirror.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20157</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-04-10 23:33:32 +0000</bug_when>
    <thetext>I just changed my DL_DIR to match your and it worked also, please re-test when you get a chance and report any further issues or if we should close this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20191</commentid>
    <comment_count>4</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2012-04-11 16:29:16 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I just changed my DL_DIR to match your and it worked also, please re-test when
&gt; you get a chance and report any further issues or if we should close this.

OK now it works as expected. So reason might have been what I stated

NOTE: package apt-0.7.14-r11: task do_fetch: Started
WARNING: Failed to fetch URL ftp://ftp.debian.org/debian/pool/main/a/apt/apt_0.7.14.tar.gz
NOTE: package apt-0.7.14-r11: task do_fetch: Succeeded</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>