summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/__init__.py10
-rw-r--r--pym/portage/dbapi/porttree.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index d44422cb7..3819bfd32 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -71,6 +71,7 @@ try:
import portage.proxy.lazyimport
import portage.proxy as proxy
proxy.lazyimport.lazyimport(globals(),
+ 'portage.cache.mappings:OrderedDict',
'portage.checksum',
'portage.checksum:perform_checksum,perform_md5,prelink_capable',
'portage.cvstree',
@@ -132,6 +133,13 @@ except ImportError as e:
sys.stderr.write(" "+str(e)+"\n\n")
raise
+try:
+ from collections import OrderedDict
+except ImportError:
+ # lazy import is above
+ # from portage.cache.mappings import OrderedDict
+ pass
+
if sys.hexversion >= 0x3000000:
basestring = str
long = int
@@ -4531,7 +4539,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
for myuri in myuris:
file_uri_tuples.append((os.path.basename(myuri), myuri))
- filedict={}
+ filedict = OrderedDict()
primaryuri_indexes={}
primaryuri_dict = {}
thirdpartymirror_uris = {}
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index df2c65640..825ca821c 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -16,7 +16,6 @@ portage.proxy.lazyimport.lazyimport(globals(),
)
from portage.cache.cache_errors import CacheError
-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
@@ -32,6 +31,7 @@ from portage import os
from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
+from portage import OrderedDict
import os as _os
import codecs