summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-12 22:58:50 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-12 22:58:50 +0000
commitc11de5b58f78b0c84328e6b6cb38462a61fbabb7 (patch)
treef0fab1246f3e7fe23278b3fed1ca88d43070a329 /pym
parentef047aec4cceca8f66aa06b2b2f1bf177d5d0970 (diff)
downloadportage-c11de5b58f78b0c84328e6b6cb38462a61fbabb7.tar.gz
portage-c11de5b58f78b0c84328e6b6cb38462a61fbabb7.tar.bz2
portage-c11de5b58f78b0c84328e6b6cb38462a61fbabb7.zip
Filter sets that are not "world candidates" from the favorites list at
the last moment since the favorites list needs to be complete for depgraph.loadResumeCommand() to operate correctly. svn path=/main/trunk/; revision=10312
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index cee8db101..9acfac207 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2568,8 +2568,7 @@ class depgraph(object):
self._sets[s] = expanded_set
args.append(SetArg(arg=x, set=expanded_set,
root_config=root_config))
- if sets[s].world_candidate:
- myfavorites.append(x)
+ myfavorites.append(x)
continue
if not is_valid_package_atom(x):
portage.writemsg("\n\n!!! '%s' is not a valid package atom.\n" % x,
@@ -8286,9 +8285,20 @@ def action_build(settings, trees, mtimedb,
mergecount += 1
if mergecount==0:
- if "--noreplace" in myopts and not oneshot and favorites:
+ sets = trees[settings["ROOT"]]["root_config"].sets
+ if "--noreplace" in myopts and \
+ not oneshot and favorites:
+ # Sets that are not world candidates are filtered
+ # out here since the favorites list needs to be
+ # complete for depgraph.loadResumeCommand() to
+ # operate correctly.
+ world_candidates = [x for x in favorites \
+ if not (x.startswith(SETPREFIX) and \
+ not sets[x[1:]].world_candidate)]
+ if "--noreplace" in myopts and \
+ not oneshot and world_candidates:
print
- for x in favorites:
+ for x in world_candidates:
print " %s %s" % (good("*"), x)
prompt="Would you like to add these packages to your world favorites?"
elif settings["AUTOCLEAN"] and "yes"==settings["AUTOCLEAN"]: