From: Zac Medico Date: Mon, 12 May 2008 22:58:50 +0000 (-0000) Subject: Filter sets that are not "world candidates" from the favorites list at X-Git-Tag: v2.2_pre7~33 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c11de5b58f78b0c84328e6b6cb38462a61fbabb7;p=portage.git 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 --- 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"]: