From 86c8ae497f9a82fa976db5e1ffbd71f250d11ca1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 11 Oct 2007 05:37:00 +0000 Subject: [PATCH] Make depgraph.select_dep() reject installed packages in the same cases that it used to so that a warning message is properly generated in depgraph.xcreate() when a package is unavailable but installed. svn path=/main/trunk/; revision=8045 --- pym/emerge/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index e681fd231..63146e93a 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1936,13 +1936,15 @@ class depgraph(object): existing_node = None myeb = None usepkgonly = "--usepkgonly" in self.myopts + empty = "empty" in self.myparams + selective = "selective" in self.myparams for find_existing_node in True, False: if existing_node: break for db, pkg_type, built, installed, db_keys in dbs: if existing_node: break - if installed and matched_packages: + if installed and (matched_packages or empty): # We only need to select an installed package here # if there is no other choice. continue @@ -2061,6 +2063,8 @@ class depgraph(object): "empty" not in self.myparams and \ vardb.cpv_exists(cpv): break + if installed and not (selective or not myarg): + break # Metadata accessed above is cached internally by # each db in order to optimize visibility checks. # Now that all possible checks visibility checks -- 2.26.2