From 87ec55665ac0890f13864cc678c950ce4cd64c13 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 5 Mar 2009 05:44:20 +0000 Subject: Make config.categories a sorted tuple so that portdbapi can reuse it. svn path=/main/trunk/; revision=12760 --- pym/portage/__init__.py | 3 ++- pym/portage/dbapi/porttree.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 26860de80..c60f7eb37 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 -- cgit v1.2.3-1-g7c22