diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-06-22 02:59:53 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-06-22 02:59:53 -0700 |
commit | e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01 (patch) | |
tree | bc90757f7887bf571d98617d1178ff2be3c90ff1 /pym/portage/versions.py | |
parent | 19123d07f93bff6833848774812de882e7be9960 (diff) | |
download | portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.tar.gz portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.tar.bz2 portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.zip |
Add experimental EAPI 4-slot-abi support.
Refer to 4-slot-abi.docbook for a full description.
Diffstat (limited to 'pym/portage/versions.py')
-rw-r--r-- | pym/portage/versions.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pym/portage/versions.py b/pym/portage/versions.py index a1ded6771..5893096d1 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -356,13 +356,24 @@ class _pkg_str(_unicode): # for match_from_list introspection self.__dict__['cpv'] = self if slot is not None: - slot_match = _get_slot_re(_get_eapi_attrs(eapi)).match(slot) + eapi_attrs = _get_eapi_attrs(eapi) + slot_match = _get_slot_re(eapi_attrs).match(slot) if slot_match is None: # Avoid an InvalidAtom exception when creating SLOT atoms self.__dict__['slot'] = '0' + self.__dict__['slot_abi'] = '0' self.__dict__['slot_invalid'] = slot else: - self.__dict__['slot'] = slot + if eapi_attrs.slot_abi: + slot_split = slot.split("/") + self.__dict__['slot'] = slot_split[0] + if len(slot_split) > 1: + self.__dict__['slot_abi'] = slot_split[1] + else: + self.__dict__['slot_abi'] = slot_split[0] + else: + self.__dict__['slot'] = slot + self.__dict__['slot_abi'] = slot if repo is not None: repo = _gen_valid_repo(repo) |