doebuild_environment: include EPREFIX in ED
authorZac Medico <zmedico@gentoo.org>
Thu, 1 Sep 2011 06:48:25 +0000 (23:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 1 Sep 2011 06:48:25 +0000 (23:48 -0700)
pym/portage/package/ebuild/doebuild.py

index 45b28631c21f5a7eae0ebf645a62888fc58dcf3c..7b3561e778fcf99f61631ea6e2b391086e0c2c88 100644 (file)
@@ -268,7 +268,9 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
        mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
 
        # Prefix forward compatability
-       mysettings["ED"] = mysettings["D"]
+       eprefix_lstrip = mysettings["EPREFIX"].lstrip(os.sep)
+       mysettings["ED"] = os.path.join(
+               mysettings["D"], eprefix_lstrip).rstrip(os.sep) + os.sep
 
        mysettings["PORTAGE_BASHRC"] = os.path.join(
                mysettings["PORTAGE_CONFIGROOT"], EBUILD_SH_ENV_FILE)