Remove redundant initialization of CBUILD for cloned config instances.
authorZac Medico <zmedico@gentoo.org>
Thu, 20 Jul 2006 07:26:15 +0000 (07:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 20 Jul 2006 07:26:15 +0000 (07:26 -0000)
svn path=/main/trunk/; revision=3964

pym/portage.py

index 134cf3b20e70a507f67acaa10eda53f45ac7282f..3838adcd8b5edf366f57f1c4de7de6118693d1df 100644 (file)
@@ -1213,6 +1213,10 @@ class config:
                                self["PORTDIR_OVERLAY"] = " ".join(new_ov)
                                self.backup_changes("PORTDIR_OVERLAY")
 
+                       if "CBUILD" not in self and "CHOST" in self:
+                               self["CBUILD"] = self["CHOST"]
+                               self.backup_changes("CBUILD")
+
                self.lookuplist=self.configlist[:]
                self.lookuplist.reverse()
 
@@ -1265,10 +1269,6 @@ class config:
                self["FEATURES"] = " ".join(self.features)
                self.backup_changes("FEATURES")
 
-               if not len(self["CBUILD"]) and len(self["CHOST"]):
-                       self["CBUILD"] = self["CHOST"]
-                       self.backup_changes("CBUILD")
-
                if mycpv:
                        self.setcpv(mycpv)