diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-05-13 01:36:25 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-05-13 01:36:25 -0700 |
commit | f31320b67c9f593a2a8592e1a4e547f5f641943a (patch) | |
tree | b5fbe65ded8a1ffc75ccf5f80c50e0872ad6972a /pym/portage/versions.py | |
parent | 0903cf2a1544d970b286a3e7e1f3276daa4eab9c (diff) | |
download | portage-f31320b67c9f593a2a8592e1a4e547f5f641943a.tar.gz portage-f31320b67c9f593a2a8592e1a4e547f5f641943a.tar.bz2 portage-f31320b67c9f593a2a8592e1a4e547f5f641943a.zip |
_pkg_str: add version attribute for comparisons
This attribute can be passed directly into vercmp, avoiding the need to
generate this string many times.
Diffstat (limited to 'pym/portage/versions.py')
-rw-r--r-- | pym/portage/versions.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pym/portage/versions.py b/pym/portage/versions.py index 33c7159a5..35385e4d2 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -351,6 +351,7 @@ class _pkg_str(_unicode): if self.cpv_split is None: raise InvalidData(cpv) self.__dict__['cp'] = self.cpv_split[0] + '/' + self.cpv_split[1] + self.__dict__['version'] = "-".join(self.cpv_split[2:]) # for match_from_list introspection self.__dict__['cpv'] = self if slot is not None: |