summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-11 06:43:30 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-11 06:43:30 +0000
commita6430ac6f8f2f529558de75a32e4d42eb085a195 (patch)
treeb4599d05b1f6348baf75b33403c7f6e494ac3041 /pym
parent370b84e9a0fb19f749bbdc43290b07d49c3f63d6 (diff)
downloadportage-a6430ac6f8f2f529558de75a32e4d42eb085a195.tar.gz
portage-a6430ac6f8f2f529558de75a32e4d42eb085a195.tar.bz2
portage-a6430ac6f8f2f529558de75a32e4d42eb085a195.zip
Make config.categories a sorted tuple so that portdbapi can reuse it.
(trunk r12760) svn path=/main/branches/2.1.6/; revision=13008
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py3
-rw-r--r--pym/portage/dbapi/porttree.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 9eae9845c..dbc19f8ed 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1607,7 +1607,8 @@ class config(object):
#getting categories from an external file now
categories = [grabfile(os.path.join(x, "categories")) for x in locations]
- self.categories = stack_lists(categories, incremental=1)
+ self.categories = tuple(sorted(
+ stack_lists(categories, incremental=1)))
del categories
archlist = [grabfile(os.path.join(x, "arch.list")) for x in locations]
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 7ac281e8b..57bdd9984 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -100,7 +100,7 @@ class portdbapi(dbapi):
from portage import settings
self.mysettings = config(clone=settings)
self._iuse_implicit = self.mysettings._get_implicit_iuse()
- self._categories = tuple(sorted(set(self.mysettings.categories)))
+ self._categories = self.mysettings.categories
# This is strictly for use in aux_get() doebuild calls when metadata
# is generated by the depend phase. It's safest to use a clone for
# this purpose because doebuild makes many changes to the config