def _set_returncode(self, wait_retval): EbuildProcess._set_returncode(self, wait_retval) pkg = self.pkg bintree = pkg.root_config.trees["bintree"] binpkg_tmpfile = self._binpkg_tmpfile if self.returncode == os.EX_OK: bintree.inject(pkg.cpv, filename=binpkg_tmpfile)
def _start_ebuild(self): if self.phase == "package": self._start_task( PackagePhase(actionmap=self.actionmap, background=self.background, fd_pipes=self.fd_pipes, logfile=self._get_log_path(), scheduler=self.scheduler, settings=self.settings), self._ebuild_exit) return if self.phase == "unpack": alist = self.settings.configdict["pkg"].get("A", "").split() _prepare_fake_distdir(self.settings, alist) _prepare_fake_filesdir(self.settings) fd_pipes = self.fd_pipes if fd_pipes is None: if not self.background and self.phase == 'nofetch': # All the pkg_nofetch output goes to stderr since # it's considered to be an error message. fd_pipes = {1: sys.__stderr__.fileno()} ebuild_process = EbuildProcess(actionmap=self.actionmap, background=self.background, fd_pipes=fd_pipes, logfile=self._get_log_path(), phase=self.phase, scheduler=self.scheduler, settings=self.settings) self._start_task(ebuild_process, self._ebuild_exit)
def _start_ebuild(self): # Don't open the log file during the clean phase since the # open file can result in an nfs lock on $T/build.log which # prevents the clean phase from removing $T. logfile = None if self.phase not in ("clean", "cleanrm") and \ self.settings.get("PORTAGE_BACKGROUND") != "subprocess": logfile = self.settings.get("PORTAGE_LOG_FILE") fd_pipes = None if not self.background and self.phase == 'nofetch': # All the pkg_nofetch output goes to stderr since # it's considered to be an error message. fd_pipes = {1: sys.stderr.fileno()} ebuild_process = EbuildProcess(actionmap=self.actionmap, background=self.background, fd_pipes=fd_pipes, logfile=logfile, phase=self.phase, scheduler=self.scheduler, settings=self.settings) self._start_task(ebuild_process, self._ebuild_exit)
def _start(self): ebuild_process = EbuildProcess(background=self.background, pkg=self.pkg, phase=self.phase, scheduler=self.scheduler, settings=self.settings, tree=self.tree) self._start_task(ebuild_process, self._ebuild_exit)
def _start(self): self.phase = "package" self.tree = "porttree" pkg = self.pkg root_config = pkg.root_config portdb = root_config.trees["porttree"].dbapi bintree = root_config.trees["bintree"] ebuild_path = portdb.findname(pkg.cpv) if ebuild_path is None: raise AssertionError("ebuild not found for '%s'" % pkg.cpv) settings = self.settings debug = settings.get("PORTAGE_DEBUG") == "1" bintree.prevent_collision(pkg.cpv) binpkg_tmpfile = os.path.join(bintree.pkgdir, pkg.cpv + ".tbz2." + str(os.getpid())) self._binpkg_tmpfile = binpkg_tmpfile settings["PORTAGE_BINPKG_TMPFILE"] = binpkg_tmpfile settings.backup_changes("PORTAGE_BINPKG_TMPFILE") try: EbuildProcess._start(self) finally: settings.pop("PORTAGE_BINPKG_TMPFILE", None)
def _start_ebuild(self): fd_pipes = self.fd_pipes if fd_pipes is None: if not self.background and self.phase == 'nofetch': # All the pkg_nofetch output goes to stderr since # it's considered to be an error message. fd_pipes = {1 : sys.__stderr__.fileno()} ebuild_process = EbuildProcess(actionmap=self.actionmap, background=self.background, fd_pipes=fd_pipes, logfile=self._get_log_path(), phase=self.phase, scheduler=self.scheduler, settings=self.settings) self._start_task(ebuild_process, self._ebuild_exit)
def _start_ebuild(self): # Don't open the log file during the clean phase since the # open file can result in an nfs lock on $T/build.log which # prevents the clean phase from removing $T. logfile = self.settings.get("PORTAGE_LOG_FILE") if self.phase in ("clean", "cleanrm"): logfile = None ebuild_process = EbuildProcess(actionmap=self.actionmap, background=self.background, logfile=logfile, phase=self.phase, scheduler=self.scheduler, settings=self.settings) self._start_task(ebuild_process, self._ebuild_exit)
def _start_package_phase(self): ebuild_process = EbuildProcess( actionmap=self.actionmap, background=self.background, fd_pipes=self.fd_pipes, logfile=self.logfile, phase="package", scheduler=self.scheduler, settings=self.settings, ) if self._pkg_install_mask: d_orig = self.settings["D"] try: self.settings["D"] = self._proot self._start_task(ebuild_process, self._pkg_install_mask_cleanup) finally: self.settings["D"] = d_orig else: self._start_task(ebuild_process, self._default_final_exit)