public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r11256 - main/trunk/pym/_emerge
@ 2008-07-29  0:46 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-07-29  0:46 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-07-29 00:46:54 +0000 (Tue, 29 Jul 2008)
New Revision: 11256

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Redirect the FEATURES=buildsyspkg message to the log when in background mode.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-07-28 22:59:59 UTC (rev 11255)
+++ main/trunk/pym/_emerge/__init__.py	2008-07-29 00:46:54 UTC (rev 11256)
@@ -2321,7 +2321,7 @@
 	__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 @@
 		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 @@
 			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)
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-29  0:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29  0:46 [gentoo-commits] portage r11256 - main/trunk/pym/_emerge Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox