Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296439 - portage-r14968 breaks SRC_URI handling.
Summary: portage-r14968 breaks SRC_URI handling.
Status: RESOLVED DUPLICATE of bug 296369
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-10 18:48 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2009-12-10 18:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-10 18:48:45 UTC
>>> Fetching (4 of 4) dev-java/sun-jdk-1.5.0.22
>>> Downloading 'http://distfiles.gentoo.org/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh'
--2009-12-10 12:38:58--  http://distfiles.gentoo.org/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh
Resolving distfiles.gentoo.org... 149.20.20.135
Connecting to distfiles.gentoo.org|149.20.20.135|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mirrors.kernel.org/gentoo/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh [following]
--2009-12-10 12:38:58--  http://mirrors.kernel.org/gentoo/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh
Resolving mirrors.kernel.org... 149.20.20.135
Reusing existing connection to distfiles.gentoo.org:80.
HTTP request sent, awaiting response... 404 Not Found
2009-12-10 12:38:58 ERROR 404: Not Found.

>>> Downloading 'jdk-5.0u22-dlj-solaris-sparc.sh'
--2009-12-10 12:38:58--  http://jdk-5.0u22-dlj-solaris-sparc.sh/
Resolving jdk-5.0u22-dlj-solaris-sparc.sh... failed: Unknown host.
wget: unable to resolve host address `jdk-5.0u22-dlj-solaris-sparc.sh'
!!! Couldn't download 'jdk-5.0u22-dlj-solaris-sparc.sh'. Aborting.
>>> Downloading 'http://distfiles.gentoo.org/distfiles/jdk-5.0u22-dlj-solaris-sparcv9.sh'
--2009-12-10 12:38:58--  http://distfiles.gentoo.org/distfiles/jdk-5.0u22-dlj-solaris-sparcv9.sh
Resolving distfiles.gentoo.org... 149.20.20.135
Connecting to distfiles.gentoo.org|149.20.20.135|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mirrors.kernel.org/gentoo/distfiles/jdk-5.0u22-dlj-solaris-sparcv9.sh [following]
--2009-12-10 12:38:58--  http://mirrors.kernel.org/gentoo/distfiles/jdk-5.0u22-dlj-solaris-sparcv9.sh
Resolving mirrors.kernel.org... 149.20.20.135
Reusing existing connection to distfiles.gentoo.org:80.
HTTP request sent, awaiting response... 404 Not Found
2009-12-10 12:38:58 ERROR 404: Not Found.


then reverting r14968:

--2009-12-10 12:44:05--  http://distfiles.gentoo.org/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh
Resolving distfiles.gentoo.org... 149.20.20.135
Connecting to distfiles.gentoo.org|149.20.20.135|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mirrors.kernel.org/gentoo/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh [following]
--2009-12-10 12:44:05--  http://mirrors.kernel.org/gentoo/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh
Resolving mirrors.kernel.org... 149.20.20.135
Reusing existing connection to distfiles.gentoo.org:80.
HTTP request sent, awaiting response... 404 Not Found
2009-12-10 12:44:05 ERROR 404: Not Found.

>>> Downloading 'http://download.java.net/dlj/binaries/jdk-5.0u22-dlj-solaris-sparc.sh'
--2009-12-10 12:44:05--  http://download.java.net/dlj/binaries/jdk-5.0u22-dlj-solaris-sparc.sh
Resolving download.java.net... 72.5.124.114
Connecting to download.java.net|72.5.124.114|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 54118988 (52M) [application/x-sh]
Saving to: `/home/jolexa/portage/global/portage_tree/distfiles/jdk-5.0u22-dlj-solaris-sparc.sh'

100%[======================================>] 54,118,988   487K/s   in 84s

magic. I don't pretend to know enough about python/portage to debug any further. Here is the problem and reverting r14968 fixes it. Figured a bug of this magnitude should be tracked in bugzilla vs irc.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-10 18:51:10 UTC
$ svn log -r 14968
------------------------------------------------------------------------
r14968 | zmedico | 2009-12-08 21:07:31 +0000 (Tue, 08 Dec 2009) | 3 lines

Use OrderedDict in portdbapi.getFetchMap() so that order in $A corresponds
to order in SRC_URI.

------------------------------------------------------------------------
Comment 2 Fabian Groffen gentoo-dev 2009-12-10 18:52:36 UTC
% cvs diff -r1496{7,8} | & less
Index: pym/portage/dbapi/porttree.py
===================================================================
--- pym/portage/dbapi/porttree.py       (revision 14967)
+++ pym/portage/dbapi/porttree.py       (revision 14968)
@@ -16,7 +16,7 @@
 )
 
 from portage.cache.cache_errors import CacheError
-from portage.cache.mappings import slot_dict_class
+from portage.cache.mappings import OrderedDict
 from portage.const import REPO_NAME_LOC
 from portage.data import portage_gid, secpass
 from portage.dbapi import dbapi
@@ -734,7 +734,7 @@
                        matchall=(useflags is None))
                myuris = flatten(myuris)
 
-               uri_map = {}
+               uri_map = OrderedDict()
 
                myuris.reverse()
                while myuris:


------------------------------------------------------------------------
r14968 | zmedico | 2009-12-08 22:07:31 +0100 (Tue, 08 Dec 2009) | 3 lines

Use OrderedDict in portdbapi.getFetchMap() so that order in $A corresponds
to order in SRC_URI.



I tried looking in portage.cache.mappings, but couldn't find any clues why it tries to fetch http://<filename> in the end (without the rest of the URL that is in SRC_URI)
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-10 18:58:23 UTC

*** This bug has been marked as a duplicate of bug 296369 ***