summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-01 08:32:57 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-01 08:32:57 +0000
commit7bed5b16d332e089f0404c0e468fbddb8d873eb3 (patch)
treebb1a0a1be97d504b20b06cacd35b636f0ce6c00e
parentRemove unnecessary handler for plain "Exception" from lstat() call in (diff)
downloadportage-multirepo-7bed5b16d332e089f0404c0e468fbddb8d873eb3.tar.gz
portage-multirepo-7bed5b16d332e089f0404c0e468fbddb8d873eb3.tar.bz2
portage-multirepo-7bed5b16d332e089f0404c0e468fbddb8d873eb3.zip
* In fetch(), ensure that pkg_nofetch is never called more than once.
* In _validate_deps(), revert back to using aux_get since the config instance does not cache SRC_URI. svn path=/main/trunk/; revision=11782
-rw-r--r--pym/portage/__init__.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 92c567f1..bdd85579 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3657,6 +3657,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
distdir_writable = can_fetch and not fetch_to_ro
failed_files = set()
+ restrict_fetch_msg = False
for myfile in filedict:
"""
@@ -4099,7 +4100,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
if listonly:
writemsg_stdout("\n", noiselevel=-1)
if fetched != 2:
- if restrict_fetch:
+ if restrict_fetch and not restrict_fetch_msg:
+ restrict_fetch_msg = True
msg = ("\n!!! %s/%s" + \
" has fetch restriction turned on.\n" + \
"!!! This probably means that this " + \
@@ -4135,17 +4137,21 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
mysettings.pop("EBUILD_PHASE", None)
else:
mysettings["EBUILD_PHASE"] = ebuild_phase
- if listonly:
- continue
+
+ elif restrict_fetch:
+ pass
elif listonly:
- continue
+ pass
elif not filedict[myfile]:
writemsg("Warning: No mirrors available for file" + \
" '%s'\n" % (myfile), noiselevel=-1)
else:
writemsg("!!! Couldn't download '%s'. Aborting.\n" % myfile,
noiselevel=-1)
- if fetchonly and not restrict_fetch:
+
+ if listonly:
+ continue
+ elif fetchonly:
failed_files.add(myfile)
continue
return 0
@@ -5847,7 +5853,8 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi):
misc_keys = ["LICENSE", "PROPERTIES", "PROVIDE", "RESTRICT", "SRC_URI"]
other_keys = ["SLOT"]
all_keys = dep_keys + misc_keys + other_keys
- metadata = mysettings.configdict["pkg"]
+ metadata = dict(izip(all_keys,
+ mydbapi.aux_get(mysettings.mycpv, all_keys)))
class FakeTree(object):
def __init__(self, mydb):