From: Zac Medico Date: Sat, 28 Jun 2008 23:32:58 +0000 (-0000) Subject: Make EbuildBinpkg delegate everything up to src_install() to X-Git-Tag: v2.2_rc2~286 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e49fb13e72b0d7f658a0015ae7fbf3bb099d4609;p=portage.git Make EbuildBinpkg delegate everything up to src_install() to the EbuildBuild class. svn path=/main/trunk/; revision=10839 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 4ae7d78be..5b3fa09e2 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1476,7 +1476,9 @@ class EbuildBuild(Task): return retval class EbuildBinpkg(Task): - + """ + This assumes that src_install() has successfully completed. + """ __slots__ = ("pkg", "settings") def _get_hash_key(self): @@ -1500,13 +1502,21 @@ class EbuildBinpkg(Task): settings["PORTAGE_BINPKG_TMPFILE"] = binpkg_tmpfile settings.backup_changes("PORTAGE_BINPKG_TMPFILE") + # Earlier phases should already be done, so + # use "noauto" to quietly skip them. + settings.features.append("noauto") + try: retval = portage.doebuild(ebuild_path, "package", root_config.root, settings, debug, mydbapi=portdb, tree="porttree") finally: - self.settings.pop("PORTAGE_BINPKG_TMPFILE", None) + settings.pop("PORTAGE_BINPKG_TMPFILE", None) + try: + settings.features.remove("noauto") + except ValueError: + pass if retval == os.EX_OK: bintree.inject(pkg.cpv, filename=binpkg_tmpfile) @@ -6517,6 +6527,11 @@ class MergeTask(object): (mergecount, len(mymergelist), pkg_key) emergelog(xterm_titles, msg, short_msg=short_msg) + build = EbuildBuild(pkg=pkg, settings=pkgsettings) + retval = build.execute() + if retval != os.EX_OK: + raise self._pkg_failure(retval) + build = EbuildBinpkg(pkg=pkg, settings=pkgsettings) retval = build.execute() if retval != os.EX_OK: