Make sure that emerge really removes noauto from FEATURES for bug #131820.
authorZac Medico <zmedico@gentoo.org>
Mon, 1 May 2006 07:29:28 +0000 (07:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 1 May 2006 07:29:28 +0000 (07:29 -0000)
svn path=/main/trunk/; revision=3292

bin/emerge
pym/portage.py

index 87f28730150df919b1c9074451c0fc0dd99d92c7..c74d949ff6683de38a6b8f579ff9bf26365b937d 100755 (executable)
@@ -168,8 +168,13 @@ if portage.settings.has_key("PORTAGE_NICENESS"):
 portage.portdb.freeze()
 
 # Kill noauto as it will break merges otherwise.
-while 'noauto' in portage.settings.features:
-       portage.settings.features.remove('noauto')
+if "noauto" in portage.settings.features:
+       while "noauto" in portage.settings.features:
+               portage.settings.features.remove("noauto")
+       portage.settings.unlock()
+       portage.settings["FEATURES"] = " ".join(portage.settings.features)
+       portage.settings.backup_changes("FEATURES")
+       portage.settings.lock()
 
 #number of ebuilds merged
 merged=0
index 972303f1fa2f73ea48391af5e70634d2638787ab..45f3f213969bf6656b6acff957f1cc870b72d4a5 100644 (file)
@@ -1287,7 +1287,12 @@ class config:
                        self["PORTDIR_OVERLAY"] = string.join(new_ov)
                        self.backup_changes("PORTDIR_OVERLAY")
 
-               self.regenerate()
+               # XXX
+               # The below self.regenerate() causes previous changes to FEATURES (and 
+               # other incrementals) to be reverted.  If this instance is a clone, we
+               # need to skip regenerate() so that the copied values are preserved.
+               if clone is None:
+                       self.regenerate()
 
                self.features = portage_util.unique_array(self["FEATURES"].split())