Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r12196 - main/trunk/pym/_emerge
Date: Wed, 10 Dec 2008 07:47:46 +0000
Author: zmedico
Date: 2008-12-10 07:47:45 +0000 (Wed, 10 Dec 2008)
New Revision: 12196

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Make the Binpkg class handle fetch logging similar to how EbuildBuild does,
directing output to PORTAGE_LOG_FILE instead of emerge-fetch.log which is
only used for prefetchers now.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-12-10 06:53:42 UTC (rev 12195)
+++ main/trunk/pym/_emerge/__init__.py	2008-12-10 07:47:45 UTC (rev 12196)
@@ -3141,6 +3141,10 @@
 		self._image_dir = os.path.join(dir_path, "image")
 		self._infloc = os.path.join(dir_path, "build-info")
 		self._ebuild_path = os.path.join(self._infloc, pkg.pf + ".ebuild")
+		settings["EBUILD"] = self._ebuild_path
+		debug = settings.get("PORTAGE_DEBUG") == "1"
+		portage.doebuild_environment(self._ebuild_path, "setup",
+			settings["ROOT"], settings, debug, 1, self._bintree.dbapi)
 
 		# The prefetcher has already completed or it
 		# could be running now. If it's running now,
@@ -3180,8 +3184,11 @@
 
 		pkg = self.pkg
 		pkg_count = self.pkg_count
+		if not self.opts.fetchonly:
+			self._build_dir.lock()
+			portage.prepare_build_dirs(self.settings["ROOT"], self.settings, 1)
 		fetcher = BinpkgFetcher(background=self.background,
-			logfile=self.scheduler.fetch.log_file, pkg=self.pkg,
+			logfile=self.settings.get("PORTAGE_LOG_FILE"), pkg=self.pkg,
 			scheduler=self.scheduler)
 		pkg_path = fetcher.pkg_path
 		self._pkg_path = pkg_path
@@ -3193,13 +3200,7 @@
 			short_msg = "emerge: (%s of %s) %s Fetch" % \
 				(pkg_count.curval, pkg_count.maxval, pkg.cpv)
 			self.logger.log(msg, short_msg=short_msg)
-
-			if self.background:
-				fetcher.addExitListener(self._fetcher_exit)
-				self._current_task = fetcher
-				self.scheduler.fetch.schedule(fetcher)
-			else:
-				self._start_task(fetcher, self._fetcher_exit)
+			self._start_task(fetcher, self._fetcher_exit)
 			return
 
 		self._fetcher_exit(fetcher)
@@ -3211,20 +3212,18 @@
 		if fetcher.returncode is not None:
 			self._fetched_pkg = True
 			if self._default_exit(fetcher) != os.EX_OK:
+				self._unlock_builddir()
 				self.wait()
 				return
 
 		verifier = None
 		if self._verify:
-			verifier = BinpkgVerifier(background=self.background,
-				logfile=self.scheduler.fetch.log_file, pkg=self.pkg)
-
+			logfile = None
 			if self.background:
-				verifier.addExitListener(self._verifier_exit)
-				self._current_task = verifier
-				self.scheduler.fetch.schedule(verifier)
-			else:
-				self._start_task(verifier, self._verifier_exit)
+				logfile = self.settings.get("PORTAGE_LOG_FILE")
+			verifier = BinpkgVerifier(background=self.background,
+				logfile=logfile, pkg=self.pkg)
+			self._start_task(verifier, self._verifier_exit)
 			return
 
 		self._verifier_exit(verifier)
@@ -3232,6 +3231,7 @@
 	def _verifier_exit(self, verifier):
 		if verifier is not None and \
 			self._default_exit(verifier) != os.EX_OK:
+			self._unlock_builddir()
 			self.wait()
 			return
 
@@ -3255,12 +3255,8 @@
 			(pkg_count.curval, pkg_count.maxval, pkg.cpv)
 		logger.log(msg, short_msg=short_msg)
 
-		self._build_dir.lock()
-
 		phase = "clean"
 		settings = self.settings
-		settings.setcpv(pkg)
-		settings["EBUILD"] = self._ebuild_path
 		ebuild_phase = EbuildPhase(background=self.background,
 			pkg=pkg, phase=phase, scheduler=self.scheduler,
 			settings=settings, tree=self._tree)
@@ -3361,6 +3357,8 @@
 		self.wait()
 
 	def _unlock_builddir(self):
+		if self.opts.fetchonly:
+			return
 		portage.elog.elog_process(self.pkg.cpv, self.settings)
 		self._build_dir.unlock()
 



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in dev-perl/IO-Socket-INET6: IO-Socket-INET6-2.56.ebuild ChangeLog
Next by thread:
gentoo-x86 commit in www-client/mozilla-firefox-bin: mozilla-firefox-bin-3.1_beta2.ebuild ChangeLog
Previous by date:
gentoo-x86 commit in dev-perl/IO-Socket-INET6: IO-Socket-INET6-2.56.ebuild ChangeLog
Next by date:
gentoo-x86 commit in www-client/mozilla-firefox-bin: mozilla-firefox-bin-3.1_beta2.ebuild ChangeLog


Updated Apr 27, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.