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/_emerge/BlockerCache.py | |
parent | 68888b0450b1967cb70673a5f06b04c167ef879c (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/_emerge/BlockerCache.py')
-rw-r--r-- | pym/_emerge/BlockerCache.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/BlockerCache.py b/pym/_emerge/BlockerCache.py index 06598a44e..3ec63ced5 100644 --- a/pym/_emerge/BlockerCache.py +++ b/pym/_emerge/BlockerCache.py @@ -1,4 +1,4 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import errno @@ -16,6 +16,9 @@ except ImportError: if sys.hexversion >= 0x3000000: basestring = str long = int + _unicode = str +else: + _unicode = unicode class BlockerCache(portage.cache.mappings.MutableMapping): """This caches blockers of installed packages so that dep_check does not @@ -159,7 +162,7 @@ class BlockerCache(portage.cache.mappings.MutableMapping): @param blocker_data: An object with counter and atoms attributes. @type blocker_data: BlockerData """ - self._cache_data["blockers"][cpv] = \ + self._cache_data["blockers"][_unicode(cpv)] = \ (blocker_data.counter, tuple(str(x) for x in blocker_data.atoms)) self._modified.add(cpv) |