diff options
-rw-r--r-- | pym/_emerge/__init__.py | 18 |
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"]: |