In doebuild, fix paths to ebuild.sh and misc-functions.sh so
authorZac Medico <zmedico@gentoo.org>
Wed, 28 Nov 2007 23:50:51 +0000 (23:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 28 Nov 2007 23:50:51 +0000 (23:50 -0000)
that they work with variable PORTAGE_BIN_PATH.

svn path=/main/trunk/; revision=8734

pym/portage/__init__.py

index cd3f7517a99a02b4d54cc6acf309169a7d4a4295..f16e2d4bd76eb45a0f436a797a2971ac7f2eba26 100644 (file)
@@ -4495,8 +4495,13 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 
                fakeroot = "fakeroot" in mysettings.features
 
-               ebuild_sh = EBUILD_SH_BINARY + " %s"
-               misc_sh = MISC_SH_BINARY + " dyn_%s"
+               # Note: PORTAGE_BIN_PATH may differ from the global
+               # constant when portage is reinstalling itself.
+               portage_bin_path = mysettings["PORTAGE_BIN_PATH"]
+               ebuild_sh = os.path.join(portage_bin_path,
+                       os.path.basename(EBUILD_SH_BINARY)) + " %s"
+               misc_sh = os.path.join(portage_bin_path,
+                       os.path.basename(MISC_SH_BINARY)) + " dyn_%s"
 
                # args are for the to spawn function
                actionmap = {