diff options
-rw-r--r-- | pym/_emerge/Binpkg.py | 8 | ||||
-rw-r--r-- | pym/_emerge/EbuildBinpkg.py | 2 | ||||
-rw-r--r-- | pym/_emerge/EbuildBuild.py | 10 | ||||
-rw-r--r-- | pym/_emerge/EbuildExecuter.py | 15 | ||||
-rw-r--r-- | pym/_emerge/EbuildPhase.py | 18 | ||||
-rw-r--r-- | pym/_emerge/EbuildProcess.py | 2 | ||||
-rw-r--r-- | pym/_emerge/MiscFunctionsProcess.py | 4 | ||||
-rw-r--r-- | pym/_emerge/Scheduler.py | 12 |
8 files changed, 32 insertions, 39 deletions
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index 03f0e84b1..6fdc1a6f4 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -193,8 +193,8 @@ class Binpkg(CompositeTask): phase = "clean" settings = self.settings ebuild_phase = EbuildPhase(background=self.background, - pkg=pkg, phase=phase, scheduler=self.scheduler, - settings=settings, tree=self._tree) + phase=phase, scheduler=self.scheduler, + settings=settings) self._start_task(ebuild_phase, self._clean_exit) @@ -263,8 +263,8 @@ class Binpkg(CompositeTask): phase = "setup" setup_phase = EbuildPhase(background=self.background, - pkg=self.pkg, phase=phase, scheduler=self.scheduler, - settings=settings, tree=self._tree) + phase=phase, scheduler=self.scheduler, + settings=settings) setup_phase.addExitListener(self._setup_exit) self._current_task = setup_phase diff --git a/pym/_emerge/EbuildBinpkg.py b/pym/_emerge/EbuildBinpkg.py index 0ec2871af..8c68d70bf 100644 --- a/pym/_emerge/EbuildBinpkg.py +++ b/pym/_emerge/EbuildBinpkg.py @@ -12,7 +12,7 @@ class EbuildBinpkg(MiscFunctionsProcess): """ This assumes that src_install() has successfully completed. """ - __slots__ = ("_binpkg_tmpfile",) + __slots__ = ("_binpkg_tmpfile", "pkg") def __init__(self, **kwargs): MiscFunctionsProcess.__init__(self, phase="package", **kwargs) diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index f0fdcbdbf..060c830f4 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -103,9 +103,7 @@ class EbuildBuild(CompositeTask): self.logger.log(msg, short_msg=short_msg) pre_clean_phase = EbuildPhase(background=self.background, - pkg=self.pkg, phase='clean', - scheduler=self.scheduler, settings=self.settings, - tree=self._tree) + phase='clean', scheduler=self.scheduler, settings=self.settings) self._start_task(pre_clean_phase, self._pre_clean_exit) def _pre_clean_exit(self, pre_clean_phase): @@ -228,7 +226,7 @@ class EbuildBuild(CompositeTask): phase = 'success_hooks' success_hooks = MiscFunctionsProcess( background=self.background, - commands=[phase], phase=phase, pkg=self.pkg, + commands=[phase], phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(success_hooks, self._buildpkgonly_success_hook_exit) @@ -247,9 +245,7 @@ class EbuildBuild(CompositeTask): portage.elog.elog_process(self.pkg.cpv, self.settings) phase = 'clean' clean_phase = EbuildPhase(background=self.background, - pkg=self.pkg, phase=phase, - scheduler=self.scheduler, settings=self.settings, - tree=self._tree) + phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(clean_phase, self._clean_exit) def _clean_exit(self, clean_phase): diff --git a/pym/_emerge/EbuildExecuter.py b/pym/_emerge/EbuildExecuter.py index 7abcbb77e..158099340 100644 --- a/pym/_emerge/EbuildExecuter.py +++ b/pym/_emerge/EbuildExecuter.py @@ -12,7 +12,7 @@ from portage.package.ebuild.doebuild import _prepare_env_file, \ class EbuildExecuter(CompositeTask): - __slots__ = ("pkg", "scheduler", "settings") + ("_tree",) + __slots__ = ("pkg", "scheduler", "settings") _phases = ("prepare", "configure", "compile", "test", "install") @@ -27,7 +27,6 @@ class EbuildExecuter(CompositeTask): ]) def _start(self): - self._tree = "porttree" pkg = self.pkg scheduler = self.scheduler settings = self.settings @@ -52,8 +51,8 @@ class EbuildExecuter(CompositeTask): _prepare_fake_distdir(settings, alist) setup_phase = EbuildPhase(background=self.background, - pkg=pkg, phase="setup", scheduler=scheduler, - settings=settings, tree=self._tree) + phase="setup", scheduler=scheduler, + settings=settings) setup_phase.addExitListener(self._setup_exit) self._current_task = setup_phase @@ -66,8 +65,8 @@ class EbuildExecuter(CompositeTask): return unpack_phase = EbuildPhase(background=self.background, - pkg=self.pkg, phase="unpack", scheduler=self.scheduler, - settings=self.settings, tree=self._tree) + phase="unpack", scheduler=self.scheduler, + settings=self.settings) if self._live_eclasses.intersection(self.pkg.inherited): # Serialize $DISTDIR access for live ebuilds since @@ -97,8 +96,8 @@ class EbuildExecuter(CompositeTask): for phase in phases: ebuild_phases.add(EbuildPhase(background=self.background, - pkg=self.pkg, phase=phase, scheduler=self.scheduler, - settings=self.settings, tree=self._tree)) + phase=phase, scheduler=self.scheduler, + settings=self.settings)) self._start_task(ebuild_phases, self._default_final_exit) diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py index 8d20fd878..55f50b3db 100644 --- a/pym/_emerge/EbuildPhase.py +++ b/pym/_emerge/EbuildPhase.py @@ -17,14 +17,14 @@ import codecs class EbuildPhase(CompositeTask): - __slots__ = ("background", "pkg", "phase", - "scheduler", "settings", "tree") + __slots__ = ("background", "phase", + "scheduler", "settings") def _start(self): ebuild_process = EbuildProcess(background=self.background, - pkg=self.pkg, phase=self.phase, scheduler=self.scheduler, - settings=self.settings, tree=self.tree) + phase=self.phase, scheduler=self.scheduler, + settings=self.settings) self._start_task(ebuild_process, self._ebuild_exit) @@ -77,7 +77,7 @@ class EbuildPhase(CompositeTask): post_phase_cmds = _post_phase_cmds.get(self.phase) if post_phase_cmds is not None: post_phase = MiscFunctionsProcess(background=self.background, - commands=post_phase_cmds, phase=self.phase, pkg=self.pkg, + commands=post_phase_cmds, phase=self.phase, scheduler=self.scheduler, settings=settings) self._start_task(post_phase, self._post_phase_exit) return @@ -100,7 +100,7 @@ class EbuildPhase(CompositeTask): self.returncode = None phase = 'die_hooks' die_hooks = MiscFunctionsProcess(background=self.background, - commands=[phase], phase=phase, pkg=self.pkg, + commands=[phase], phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(die_hooks, self._die_hooks_exit) @@ -117,12 +117,10 @@ class EbuildPhase(CompositeTask): def _fail_clean(self): self.returncode = None - portage.elog.elog_process(self.pkg.cpv, self.settings) + portage.elog.elog_process(self.settings.mycpv, self.settings) phase = "clean" clean_phase = EbuildPhase(background=self.background, - pkg=self.pkg, phase=phase, - scheduler=self.scheduler, settings=self.settings, - tree=self.tree) + phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(clean_phase, self._fail_clean_exit) return diff --git a/pym/_emerge/EbuildProcess.py b/pym/_emerge/EbuildProcess.py index bd0e0d6fc..2d4d61b1b 100644 --- a/pym/_emerge/EbuildProcess.py +++ b/pym/_emerge/EbuildProcess.py @@ -11,7 +11,7 @@ from portage.package.ebuild.doebuild import _spawn_actionmap class EbuildProcess(AbstractEbuildProcess): - __slots__ = ('pkg', 'tree',) + __slots__ = () def _start(self): # Don't open the log file during the clean phase since the diff --git a/pym/_emerge/MiscFunctionsProcess.py b/pym/_emerge/MiscFunctionsProcess.py index 04445a89d..270da4277 100644 --- a/pym/_emerge/MiscFunctionsProcess.py +++ b/pym/_emerge/MiscFunctionsProcess.py @@ -1,4 +1,4 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.AbstractEbuildProcess import AbstractEbuildProcess @@ -11,7 +11,7 @@ class MiscFunctionsProcess(AbstractEbuildProcess): Spawns misc-functions.sh with an existing ebuild environment. """ - __slots__ = ('commands', 'pkg',) + __slots__ = ('commands',) def _start(self): settings = self.settings diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index ae9cbcaa8..6d7dbd9c3 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -21,7 +21,7 @@ from portage import _unicode_encode from portage.cache.mappings import slot_dict_class from portage.const import LIBC_PACKAGE_ATOM from portage.elog.messages import eerror -from portage.output import colorize, create_color_func, darkgreen, red +from portage.output import colorize, create_color_func, red bad = create_color_func("BAD") from portage.sets import SETPREFIX from portage.sets.base import InternalPackageSet @@ -623,12 +623,12 @@ class Scheduler(PollScheduler): if phase in ('die_hooks', 'success_hooks'): ebuild_phase = MiscFunctionsProcess(background=background, - commands=[phase], phase=phase, pkg=pkg, + commands=[phase], phase=phase, scheduler=scheduler, settings=settings) else: ebuild_phase = EbuildPhase(background=background, - pkg=pkg, phase=phase, scheduler=scheduler, - settings=settings, tree=pkg_dblink.treetype) + phase=phase, scheduler=scheduler, + settings=settings) ebuild_phase.start() ebuild_phase.wait() @@ -915,9 +915,9 @@ class Scheduler(PollScheduler): debug=(settings.get("PORTAGE_DEBUG", "") == 1), mydbapi=self.trees[settings["ROOT"]][tree].dbapi, use_cache=1) prepare_build_dirs(root_config.root, settings, cleanup=0) - pretend_phase = EbuildPhase(background=self._background, pkg=x, + pretend_phase = EbuildPhase(background=self._background, phase="pretend", scheduler=self._sched_iface, - settings=settings, tree=tree) + settings=settings) pretend_phase.start() ret = pretend_phase.wait() |