aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-02-01 13:23:39 -0800
committerZac Medico <zmedico@gentoo.org>2020-02-01 13:30:23 -0800
commit44076b9432a1361a39515927de2b60baa2fbddb9 (patch)
treee5627282070b89515a33cece956a27dd063c44ae /lib
parentdepclean: do not eliminate upgrades (bug 707108) (diff)
downloadportage-44076b9432a1361a39515927de2b60baa2fbddb9.tar.gz
portage-44076b9432a1361a39515927de2b60baa2fbddb9.tar.bz2
portage-44076b9432a1361a39515927de2b60baa2fbddb9.zip
cpv_expand: treat GLEP 81 acct-* categories like virtual (bug 691798)
This solves common name collisions introduced by GLEP 81 user and group management packages. TODO: Provide user configuration so that users an ignore name collisions with selected categories like app-emacs or dev-haskell. Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/_emerge/depgraph.py2
-rw-r--r--lib/portage/dbapi/cpv_expand.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index cae1c4470..1eaf20035 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -4212,7 +4212,7 @@ class depgraph(object):
if len(expanded_atoms) > 1:
number_of_virtuals = 0
for expanded_atom in expanded_atoms:
- if expanded_atom.cp.startswith("virtual/"):
+ if expanded_atom.cp.startswith(("acct-group/", "acct-user/", "virtual/")):
number_of_virtuals += 1
else:
candidate = expanded_atom
diff --git a/lib/portage/dbapi/cpv_expand.py b/lib/portage/dbapi/cpv_expand.py
index 70ee78245..ac2f6cc2e 100644
--- a/lib/portage/dbapi/cpv_expand.py
+++ b/lib/portage/dbapi/cpv_expand.py
@@ -72,9 +72,9 @@ def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
matches.append(x+"/"+myp)
if len(matches) > 1:
virtual_name_collision = False
- if len(matches) == 2:
+ if len(matches) > 1:
for x in matches:
- if not x.startswith("virtual/"):
+ if not x.startswith(("acct-group/", "acct-user/", "virtual/")):
# Assume that the non-virtual is desired. This helps
# avoid the ValueError for invalid deps that come from
# installed packages (during reverse blocker detection,