Make config.categories a sorted tuple so that portdbapi can reuse it.
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:43:30 +0000 (06:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:43:30 +0000 (06:43 -0000)
(trunk r12760)

svn path=/main/branches/2.1.6/; revision=13008

pym/portage/__init__.py
pym/portage/dbapi/porttree.py

index 9eae9845cb552d7a89bcfebfce945d84ebbc25fb..dbc19f8edab94fe9a42e8ff24243c60db793aa20 100644 (file)
@@ -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]
index 7ac281e8b50b94dae8b6c60b8316bb2b59b8bd8f..57bdd9984ecab080c67217abe3e9a851231aad7c 100644 (file)
@@ -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