Remove redundant processing of PORTDIR_OVERLAY for cloned config instances.
authorZac Medico <zmedico@gentoo.org>
Thu, 20 Jul 2006 04:40:32 +0000 (04:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 20 Jul 2006 04:40:32 +0000 (04:40 -0000)
svn path=/main/trunk/; revision=3958

pym/portage.py

index 9977cdfc6afc9ce14866b354bb4d6b3db31d02c0..43854226e8bc4959d8e0e0564a21ddced210617b 100644 (file)
@@ -1200,6 +1200,19 @@ class config:
                                while "PORTAGE_DEPCACHEDIR" in self:
                                        del self["PORTAGE_DEPCACHEDIR"]
 
+                       overlays = self.get("PORTDIR_OVERLAY","").split()
+                       if overlays:
+                               new_ov = []
+                               for ov in overlays:
+                                       ov = normalize_path(ov)
+                                       if os.path.isdir(ov):
+                                               new_ov.append(ov)
+                                       else:
+                                               writemsg("!!! Invalid PORTDIR_OVERLAY" + \
+                                                       " (not a dir): '%s'\n" % ov, noiselevel=-1)
+                               self["PORTDIR_OVERLAY"] = " ".join(new_ov)
+                               self.backup_changes("PORTDIR_OVERLAY")
+
                self.lookuplist=self.configlist[:]
                self.lookuplist.reverse()
 
@@ -1211,19 +1224,6 @@ class config:
                                #prepend db to list to get correct order
                                self.uvlist[0:0]=[self.configdict[x]]
 
-               overlays = string.split(self["PORTDIR_OVERLAY"])
-               if overlays:
-                       new_ov=[]
-                       for ov in overlays:
-                               ov = normalize_path(ov)
-                               if os.path.isdir(ov):
-                                       new_ov.append(ov)
-                               else:
-                                       writemsg(red("!!! Invalid PORTDIR_OVERLAY (not a dir): "+ov+"\n"),
-                                               noiselevel=-1)
-                       self["PORTDIR_OVERLAY"] = string.join(new_ov)
-                       self.backup_changes("PORTDIR_OVERLAY")
-
                if clone is None:
                        self.regenerate()
                        self.features = portage_util.unique_array(self["FEATURES"].split())