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
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())