diff options
-rw-r--r-- | pym/_emerge/Binpkg.py | 2 | ||||
-rw-r--r-- | pym/_emerge/EbuildBuild.py | 5 | ||||
-rw-r--r-- | pym/_emerge/EbuildBuildDir.py | 17 |
3 files changed, 6 insertions, 18 deletions
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index f50be6866..d93ea65cc 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -42,7 +42,7 @@ class Binpkg(CompositeTask): dir_path = os.path.join(settings["PORTAGE_TMPDIR"], "portage", pkg.category, pkg.pf) self._build_dir = EbuildBuildDir(dir_path=dir_path, - pkg=pkg, scheduler=self.scheduler, settings=settings) + 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") diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index c5241ffcd..c4f172c19 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -46,6 +46,8 @@ class EbuildBuild(CompositeTask): if ebuild_path is None: raise AssertionError("ebuild not found for '%s'" % pkg.cpv) self._ebuild_path = ebuild_path + portage.doebuild_environment(ebuild_path, 'setup', + settings=self.settings, db=portdb) # Check the manifest here since with --keep-going mode it's # currently possible to get this far with a broken manifest. @@ -114,7 +116,8 @@ class EbuildBuild(CompositeTask): self.wait() return - self._build_dir = EbuildBuildDir(pkg=pkg, + self._build_dir = EbuildBuildDir( + dir_path=self.settings['PORTAGE_BUILDDIR'], scheduler=self.scheduler, settings=settings) self._build_dir.lock() diff --git a/pym/_emerge/EbuildBuildDir.py b/pym/_emerge/EbuildBuildDir.py index 118001b5a..1dc63c3b4 100644 --- a/pym/_emerge/EbuildBuildDir.py +++ b/pym/_emerge/EbuildBuildDir.py @@ -9,7 +9,7 @@ import errno class EbuildBuildDir(SlotObject): - __slots__ = ("dir_path", "pkg", "scheduler", "settings", + __slots__ = ("dir_path", "scheduler", "settings", "locked", "_catdir", "_lock_obj") def __init__(self, **kwargs): @@ -27,21 +27,6 @@ class EbuildBuildDir(SlotObject): raise self.AlreadyLocked((self._lock_obj,)) dir_path = self.dir_path - if dir_path is None: - root_config = self.pkg.root_config - portdb = root_config.trees["porttree"].dbapi - ebuild_path = portdb.findname(self.pkg.cpv) - if ebuild_path is None: - raise AssertionError( - "ebuild not found for '%s'" % self.pkg.cpv) - settings = self.settings - settings.setcpv(self.pkg) - debug = settings.get("PORTAGE_DEBUG") == "1" - use_cache = 1 # always true - portage.doebuild_environment(ebuild_path, "setup", root_config.root, - self.settings, debug, use_cache, portdb) - dir_path = self.settings["PORTAGE_BUILDDIR"] - catdir = os.path.dirname(dir_path) self._catdir = catdir |