diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-29 00:46:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-29 00:46:54 +0000 |
commit | 38b4058cedf12d3d21e82875c1187de4b16ff722 (patch) | |
tree | 87c90e00ca08822e473c56957fbc49d716d9e1e1 | |
parent | 9de3e8b0ffdc542b4d62974b7d8e561321b2dd27 (diff) | |
download | portage-38b4058cedf12d3d21e82875c1187de4b16ff722.tar.gz portage-38b4058cedf12d3d21e82875c1187de4b16ff722.tar.bz2 portage-38b4058cedf12d3d21e82875c1187de4b16ff722.zip |
Redirect the FEATURES=buildsyspkg message to the log when in background mode.
svn path=/main/trunk/; revision=11256
-rw-r--r-- | pym/_emerge/__init__.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index b610dbc79..a833ad5c4 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2321,7 +2321,7 @@ class EbuildBuild(CompositeTask): __slots__ = ("args_set", "background", "find_blockers", "ldpath_mtimes", "logger", "opts", "pkg", "pkg_count", "prefetcher", "settings", "world_atom") + \ - ("_build_dir", "_buildpkg", "_ebuild_path", "_tree") + ("_build_dir", "_buildpkg", "_ebuild_path", "_issyspkg", "_tree") def _start(self): @@ -2433,16 +2433,13 @@ class EbuildBuild(CompositeTask): logger.log(msg, short_msg=short_msg) #buildsyspkg: Check if we need to _force_ binary package creation - issyspkg = "buildsyspkg" in features and \ + self._issyspkg = "buildsyspkg" in features and \ system_set.findAtomForPackage(pkg) and \ not opts.buildpkg - if opts.buildpkg or issyspkg: + if opts.buildpkg or self._issyspkg: self._buildpkg = True - if issyspkg: - portage.writemsg_stdout(">>> This is a system package, " + \ - "let's pack a rescue tarball.\n", noiselevel=-1) msg = " === (%s of %s) Compiling/Packaging (%s::%s)" % \ (pkg_count.curval, pkg_count.maxval, pkg.cpv, ebuild_path) @@ -2479,6 +2476,21 @@ class EbuildBuild(CompositeTask): self.wait() return + if self._issyspkg: + msg = ">>> This is a system package, " + \ + "let's pack a rescue tarball.\n" + + log_path = self.settings.get("PORTAGE_LOG_FILE") + if log_path is not None: + log_file = open(log_path, 'a') + try: + log_file.write(msg) + finally: + log_file.close() + + if not self.background: + portage.writemsg_stdout(msg, noiselevel=-1) + packager = EbuildBinpkg(background=self.background, pkg=self.pkg, scheduler=self.scheduler, settings=self.settings) |