diff options
-rw-r--r-- | pym/portage/__init__.py | 17 | ||||
-rw-r--r-- | pym/portage/dep.py | 1 |
2 files changed, 1 insertions, 17 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index adf306963..77288f7c0 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -7994,22 +7994,7 @@ def dep_wordreduce(mydeplist,mysettings,mydbapi,mode,use_cache=1): return deplist def cpv_getkey(mycpv): - m = dep._cpv_re.search(mycpv) - if m is not None and m.group(2) is not None: - return m.group(2) - - # Fall back to legacy code for backward compatibility. - myslash=mycpv.split("/") - mysplit=pkgsplit(myslash[-1]) - if mysplit is None: - return None - mylen=len(myslash) - if mylen==2: - return myslash[0]+"/"+mysplit[0] - elif mylen==1: - return mysplit[0] - else: - return mysplit + return dep.dep_getkey('=' + mycpv) def key_expand(mykey, mydb=None, use_cache=1, settings=None): mysplit=mykey.split("/") diff --git a/pym/portage/dep.py b/pym/portage/dep.py index ae6d43ab5..b54c528fa 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -892,7 +892,6 @@ _use = r'(\[.*\])?' _op = r'([=~]|[><]=?)' _cp = '(' + _cat + '/' + _pkg + '(-' + _version + ')?)' _cpv = '(' + _cp + '-' + _version + ')' -_cpv_re = re.compile(_cpv) _atom_re = re.compile('^(?:' + '(?P<op>' + _op + _cpv + ')|' + |