Don't skip regenerate() because leads to 'Problem resolving dependencies' from emerge...
authorZac Medico <zmedico@gentoo.org>
Mon, 1 May 2006 10:09:22 +0000 (10:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 1 May 2006 10:09:22 +0000 (10:09 -0000)
svn path=/main/trunk/; revision=3293

pym/portage.py

index 45f3f213969bf6656b6acff957f1cc870b72d4a5..43f5ff5a701fd464c1620260452c768cde256e9a 100644 (file)
@@ -1287,14 +1287,18 @@ class config:
                        self["PORTDIR_OVERLAY"] = string.join(new_ov)
                        self.backup_changes("PORTDIR_OVERLAY")
 
-               # 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())
+                       self.features = portage_util.unique_array(self["FEATURES"].split())
+               else:
+                       # 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.
+                       self.features = portage_util.unique_array(self["FEATURES"].split())
+                       self.regenerate()
+                       self["FEATURES"] = " ".join(self.features)
+                       self.backup_changes("FEATURES")
 
                #XXX: Should this be temporary? Is it possible at all to have a default?
                if "gpg" in self.features: