Make sure we doebuild uses the correct tree for fetch lists when there are overlays.
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Jul 2006 19:06:01 +0000 (19:06 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Jul 2006 19:06:01 +0000 (19:06 -0000)
svn path=/main/trunk/; revision=4047

pym/portage.py

index 6899ef8a632172df8be0af5521052ba0b21f046d..c32cb62b2d1ad77bfa51584a2c42b18a772b2838 100644 (file)
@@ -2709,9 +2709,13 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 
                mycpv = "/".join((mysettings["CATEGORY"], mysettings["PF"]))
 
-               newuris, alist = mydbapi.getfetchlist(mycpv, mysettings=mysettings)
+               # Make sure we get the correct tree in case there are overlays.
+               mytree = os.path.realpath(
+                       os.path.dirname(os.path.dirname(mysettings["O"])))
+               newuris, alist = mydbapi.getfetchlist(
+                       mycpv, mytree=mytree, mysettings=mysettings)
                alluris, aalist = mydbapi.getfetchlist(
-                       mycpv, mysettings=mysettings, all=True)
+                       mycpv, mytree=mytree, all=True, mysettings=mysettings)
                mysettings["A"] = " ".join(alist)
                mysettings["AA"] = " ".join(aalist)
                if ("mirror" in features) or fetchall: