Make config.features a set instead of a list.
authorZac Medico <zmedico@gentoo.org>
Wed, 18 Mar 2009 21:57:12 +0000 (21:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 18 Mar 2009 21:57:12 +0000 (21:57 -0000)
svn path=/main/trunk/; revision=13134

bin/ebuild
pym/portage/__init__.py

index a18f257a76d2b66926665b35295c22efa9cb4289..05ba86c03f379b199452ff199588f15412913266 100755 (executable)
@@ -186,9 +186,8 @@ if "test" in pargs:
        tmpsettings["EBUILD_FORCE_TEST"] = "1"
        tmpsettings.backup_changes("EBUILD_FORCE_TEST")
        if "test" not in tmpsettings.features:
-               tmpsettings.features.append("test")
-               tmpsettings.features.sort()
-               tmpsettings["FEATURES"] = " ".join(tmpsettings.features)
+               tmpsettings.features.add("test")
+               tmpsettings["FEATURES"] = " ".join(sorted(tmpsettings.features))
                tmpsettings.backup_changes("FEATURES")
 
 if opts.skip_manifest:
index 705c1f3379e9d2ffb9d24d7e7ba66f40282bcea6..1002994821d19b2223ab1df6752e1dcb703ef570 100644 (file)
@@ -1788,8 +1788,7 @@ class config(object):
                                if "usersandbox" in self.features:
                                        self.features.remove("usersandbox")
 
-                       self.features.sort()
-                       self["FEATURES"] = " ".join(self.features)
+                       self["FEATURES"] = " ".join(sorted(self.features))
                        self.backup_changes("FEATURES")
 
                        self._init_dirs()
@@ -2803,8 +2802,8 @@ class config(object):
                                        myflags.add(var_lower + "_" + x)
 
                if not hasattr(self, "features"):
-                       self.features = sorted(set(
-                               self.configlist[-1].get("FEATURES","").split()))
+                       self.features = set(
+                               self.configlist[-1].get("FEATURES","").split())
                self["FEATURES"] = " ".join(self.features)
 
                myflags.update(self.useforce)
@@ -6162,7 +6161,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                                return 1
                        # qmerge is a special phase that implies noclean.
                        if "noclean" not in mysettings.features:
-                               mysettings.features.append("noclean")
+                               mysettings.features.add("noclean")
                        #qmerge is specifically not supposed to do a runtime dep check
                        retval = merge(
                                mysettings["CATEGORY"], mysettings["PF"], mysettings["D"],