diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-05-12 02:25:39 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-05-12 02:32:31 -0700 |
commit | f75f2f3169a63e8b39cea1087e099e176d90e20e (patch) | |
tree | 19a18973328229c3163813b4b07b995298a2bd7f /pym/portage/dep | |
parent | catpkgsplit: don't cache results (diff) | |
download | portage-f75f2f3169a63e8b39cea1087e099e176d90e20e.tar.gz portage-f75f2f3169a63e8b39cea1087e099e176d90e20e.tar.bz2 portage-f75f2f3169a63e8b39cea1087e099e176d90e20e.zip |
Add a _pkg_str class to cache catpkgsplit results
This will compensate for the removal of the catpkgsplit cache in commit
68888b0450b1967cb70673a5f06b04c167ef879c.
Diffstat (limited to 'pym/portage/dep')
-rw-r--r-- | pym/portage/dep/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 2e3444de5..de8d1c4d1 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -43,7 +43,7 @@ from portage.eapi import eapi_has_slot_deps, eapi_has_src_uri_arrows, \ from portage.exception import InvalidAtom, InvalidData, InvalidDependString from portage.localization import _ from portage.versions import catpkgsplit, catsplit, \ - pkgcmp, vercmp, ververify, _cp, _cpv + pkgcmp, vercmp, ververify, _cp, _cpv, _pkg_str import portage.cache.mappings if sys.hexversion >= 0x3000000: @@ -1137,7 +1137,11 @@ class Atom(_atom_base): else: raise AssertionError(_("required group not found in atom: '%s'") % self) self.__dict__['cp'] = cp - self.__dict__['cpv'] = cpv + try: + self.__dict__['cpv'] = _pkg_str(cpv) + except InvalidData: + # plain cp, wildcard, or something + self.__dict__['cpv'] = cpv self.__dict__['repo'] = repo self.__dict__['slot'] = slot self.__dict__['operator'] = op |