diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-17 07:18:30 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-17 07:18:30 -0700 |
commit | e48d76874acf68de724161639519f5aaef7d2b72 (patch) | |
tree | 67edd708c35bc0cf79c855db98b0b1cca6260246 | |
parent | 20a08f6bc451426d93f09057ce6de69e0c8c9801 (diff) | |
download | portage-e48d76874acf68de724161639519f5aaef7d2b72.tar.gz portage-e48d76874acf68de724161639519f5aaef7d2b72.tar.bz2 portage-e48d76874acf68de724161639519f5aaef7d2b72.zip |
Make EbuildBinpkg inherit from EbuildProcess since the 'package'
phase is already a member of actionmap.
-rw-r--r-- | pym/_emerge/EbuildBinpkg.py | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/pym/_emerge/EbuildBinpkg.py b/pym/_emerge/EbuildBinpkg.py index 8c68d70bf..edcc4bf3b 100644 --- a/pym/_emerge/EbuildBinpkg.py +++ b/pym/_emerge/EbuildBinpkg.py @@ -1,21 +1,19 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -from _emerge.MiscFunctionsProcess import MiscFunctionsProcess +from _emerge.EbuildProcess import EbuildProcess from portage import os from portage.exception import PermissionDenied -from portage.package.ebuild.doebuild import _spawn_actionmap -from portage.package.ebuild.doebuild import spawn as doebuild_spawn from portage.util import ensure_dirs -class EbuildBinpkg(MiscFunctionsProcess): +class EbuildBinpkg(EbuildProcess): """ This assumes that src_install() has successfully completed. """ __slots__ = ("_binpkg_tmpfile", "pkg") def __init__(self, **kwargs): - MiscFunctionsProcess.__init__(self, phase="package", **kwargs) + EbuildProcess.__init__(self, phase="package", **kwargs) def _start(self): pkg = self.pkg @@ -31,22 +29,12 @@ class EbuildBinpkg(MiscFunctionsProcess): "access('%s', os.W_OK)" % parent_dir) self._binpkg_tmpfile = binpkg_tmpfile - self.logfile = self.settings.get("PORTAGE_LOG_FILE") - self.commands = ["dyn_" + self.phase] - MiscFunctionsProcess._start(self) - - def _spawn(self, args, **kwargs): - self.settings["EBUILD_PHASE"] = self.phase self.settings["PORTAGE_BINPKG_TMPFILE"] = self._binpkg_tmpfile - kwargs.update(_spawn_actionmap(self.settings)[self.phase]["args"]) - try: - return doebuild_spawn(" ".join(args), self.settings, **kwargs) - finally: - self.settings.pop("EBUILD_PHASE", None) - self.settings.pop("PORTAGE_BINPKG_TMPFILE", None) + EbuildProcess._start(self) def _set_returncode(self, wait_retval): - MiscFunctionsProcess._set_returncode(self, wait_retval) + EbuildProcess._set_returncode(self, wait_retval) + self.settings.pop("PORTAGE_BINPKG_TMPFILE", None) if self.returncode == os.EX_OK: pkg = self.pkg bintree = pkg.root_config.trees["bintree"] |