From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KCTdm-0000r7-2t for garchives@archives.gentoo.org; Sat, 28 Jun 2008 06:10:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0FA26E046E; Sat, 28 Jun 2008 06:10:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D7A74E046E for ; Sat, 28 Jun 2008 06:10:28 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 7CA4E67471 for ; Sat, 28 Jun 2008 06:10:28 +0000 (UTC) Received: from zmedico by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1KCTdg-0007mY-GM for gentoo-commits@lists.gentoo.org; Sat, 28 Jun 2008 06:10:24 +0000 To: gentoo-commits@lists.gentoo.org From: "Zac Medico (zmedico)" Subject: [gentoo-commits] portage r10831 - main/trunk/pym/_emerge X-VCS-Repository: portage X-VCS-Revision: 10831 X-VCS-Files: main/trunk/pym/_emerge/__init__.py X-VCS-Directories: main/trunk/pym/_emerge X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico Content-Type: text/plain; charset=UTF-8 Message-Id: Sender: Zac Medico Date: Sat, 28 Jun 2008 06:10:24 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0fdc0c44-a156-4d4d-92e4-5462dc1857ad X-Archives-Hash: b4ec672e631054b407150a31ed12c754 Author: zmedico Date: 2008-06-28 06:10:23 +0000 (Sat, 28 Jun 2008) New Revision: 10831 Modified: main/trunk/pym/_emerge/__init__.py Log: Split out an EbuildBuild class. Modified: main/trunk/pym/_emerge/__init__.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/trunk/pym/_emerge/__init__.py 2008-06-28 06:06:10 UTC (rev 10830= ) +++ main/trunk/pym/_emerge/__init__.py 2008-06-28 06:10:23 UTC (rev 10831= ) @@ -1451,6 +1451,30 @@ mydbapi=3Dportdb, tree=3D"porttree") return retval =20 +class EbuildBuild(Task): + + __slots__ =3D ("ldpath_mtimes", + "pkg", "pretend", "settings") + + def _get_hash_key(self): + hash_key =3D getattr(self, "_hash_key", None) + if hash_key is None: + self._hash_key =3D ("EbuildBuild", self.pkg._get_hash_key()) + return self._hash_key + + def execute(self): + root_config =3D self.pkg.root_config + portdb =3D root_config.trees["porttree"].dbapi + vartree =3D root_config.trees["vartree"] + ebuild_path =3D portdb.findname(self.pkg.cpv) + debug =3D self.settings.get("PORTAGE_DEBUG") =3D=3D "1" + + retval =3D portage.doebuild(ebuild_path, "install", + root_config.root, self.settings, debug, vartree=3Dvartree, + mydbapi=3Dportdb, tree=3D"porttree", + prev_mtimes=3Dself.ldpath_mtimes) + return retval + class EbuildMerge(Task): =20 __slots__ =3D ("find_blockers", "ldpath_mtimes", @@ -6478,10 +6502,10 @@ short_msg =3D "emerge: (%s of %s) %s Compile" % \ (mergecount, len(mymergelist), pkg_key) emergelog(xterm_titles, msg, short_msg=3Dshort_msg) - retval =3D portage.doebuild(y, "install", myroot, - pkgsettings, self.edebug, vartree=3Dvartree, - mydbapi=3Dportdb, tree=3D"porttree", - prev_mtimes=3Dldpath_mtimes) + + build =3D EbuildBuild(ldpath_mtimes=3Dldpath_mtimes, + pkg=3Dpkg, pretend=3Dpretend, settings=3Dpkgsettings) + retval =3D build.execute() if retval !=3D os.EX_OK: raise self._pkg_failure(retval) =20 --=20 gentoo-commits@lists.gentoo.org mailing list