From 7bed5b16d332e089f0404c0e468fbddb8d873eb3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 1 Nov 2008 08:32:57 +0000 Subject: * 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 --- pym/portage/__init__.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'pym/portage/__init__.py') diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 92c567f1c..bdd855791 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): -- cgit v1.2.3-1-g7c22