summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dep.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py
index 847c76eae..8dbcdd657 100644
--- a/pym/portage/dep.py
+++ b/pym/portage/dep.py
@@ -995,6 +995,16 @@ def dep_getkey(mydep):
cp = getattr(mydep, "cp", None)
if cp is not None:
return cp
+
+ try:
+ return Atom(mydep).cp
+ except InvalidAtom:
+ try:
+ return Atom('=' + mydep).cp
+ except InvalidAtom:
+ pass
+
+ # Fall back to legacy code for backward compatibility.
mydep = dep_getcpv(mydep)
if mydep and isspecific(mydep):
mysplit = catpkgsplit(mydep)