From 345e3ace7dd2885f95a6b022c2eefa110eb48c8e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 14 Sep 2010 07:37:11 -0700 Subject: [PATCH] Make Binpkg call doebuild_environment() before constructing EbuildBuildDir, so PORTAGE_BUILDDIR is initialized first. --- pym/_emerge/Binpkg.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index d93ea65cc..16826df2d 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -41,15 +41,17 @@ class Binpkg(CompositeTask): dir_path = os.path.join(settings["PORTAGE_TMPDIR"], "portage", pkg.category, pkg.pf) - self._build_dir = EbuildBuildDir(dir_path=dir_path, - scheduler=self.scheduler, settings=settings) self._image_dir = os.path.join(dir_path, "image") self._infloc = os.path.join(dir_path, "build-info") self._ebuild_path = os.path.join(self._infloc, pkg.pf + ".ebuild") settings["EBUILD"] = self._ebuild_path - debug = settings.get("PORTAGE_DEBUG") == "1" - portage.doebuild_environment(self._ebuild_path, "setup", - settings["ROOT"], settings, debug, 1, self._bintree.dbapi) + portage.doebuild_environment(self._ebuild_path, 'setup', + settings=self.settings, db=self._bintree.dbapi) + if dir_path != self.settings['PORTAGE_BUILDDIR']: + raise AssertionError("'%s' != '%s'" % \ + (dir_path, self.settings['PORTAGE_BUILDDIR'])) + self._build_dir = EbuildBuildDir(dir_path=dir_path, + scheduler=self.scheduler, settings=settings) settings.configdict["pkg"]["EMERGE_FROM"] = pkg.type_name # The prefetcher has already completed or it -- 2.26.2