aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-12-03 08:27:18 +0100
committerMichał Górny <mgorny@gentoo.org>2021-12-04 05:56:20 +0100
commitf85f0991a90b17009e02d342c58fb5b066d7b0c9 (patch)
tree40962246e17e4a63e8cf081d9ac2d0efe26febfe /lib/_emerge/depgraph.py
parentemerge: Default enable soname dependencies (bug 687956) (diff)
downloadportage-f85f0991a90b17009e02d342c58fb5b066d7b0c9.tar.gz
portage-f85f0991a90b17009e02d342c58fb5b066d7b0c9.tar.bz2
portage-f85f0991a90b17009e02d342c58fb5b066d7b0c9.zip
emerge: Do not resolve ambiguous package names via installed pkgs
When dealing with ambiguous package names on command-line, do not use installed packages to resolve them. This is counterintuitive in the best case, and probably the wrong answer most of the time. After all, if a user calls emerge with a specific package name, it is quite likely that he intends to install a missing package rather than rebuild or upgrade an individual package (though the latter can also happen). Rather than making assumptions that can go wrong, just display the ambiguity message as usual. Bug: https://bugs.gentoo.org/828059 Closes: https://github.com/gentoo/portage/pull/775 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r--lib/_emerge/depgraph.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 07431c8ee..f6549eba6 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -4806,21 +4806,6 @@ class depgraph:
if len(non_virtual_cps) == 1:
installed_cp_set = non_virtual_cps
- if len(expanded_atoms) > 1 and len(installed_cp_set) == 1:
- installed_cp = next(iter(installed_cp_set))
- for atom in expanded_atoms:
- if atom.cp == installed_cp:
- available = False
- for pkg in self._iter_match_pkgs_any(
- root_config, atom.without_use, onlydeps=onlydeps
- ):
- if not pkg.installed:
- available = True
- break
- if available:
- expanded_atoms = [atom]
- break
-
# If a non-virtual package and one or more virtual packages
# are in expanded_atoms, use the non-virtual package.
if len(expanded_atoms) > 1: