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)
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
"""
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)
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):
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)
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):
class EbuildExecuter(CompositeTask):
- __slots__ = ("pkg", "scheduler", "settings") + ("_tree",)
+ __slots__ = ("pkg", "scheduler", "settings")
_phases = ("prepare", "configure", "compile", "test", "install")
])
def _start(self):
- self._tree = "porttree"
pkg = self.pkg
scheduler = self.scheduler
settings = self.settings
_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
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
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)
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)
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
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)
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
class EbuildProcess(AbstractEbuildProcess):
- __slots__ = ('pkg', 'tree',)
+ __slots__ = ()
def _start(self):
# Don't open the log file during the clean phase since the
-# 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
Spawns misc-functions.sh with an existing ebuild environment.
"""
- __slots__ = ('commands', 'pkg',)
+ __slots__ = ('commands',)
def _start(self):
settings = self.settings
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
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()
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()