summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-28 23:32:58 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-28 23:32:58 +0000
commite49fb13e72b0d7f658a0015ae7fbf3bb099d4609 (patch)
tree3178d583b45b06af2a75f3d45916a732e5a508a9
parent48f817b0cd6d48636685d11a27af2067b17d5b3e (diff)
downloadportage-e49fb13e72b0d7f658a0015ae7fbf3bb099d4609.tar.gz
portage-e49fb13e72b0d7f658a0015ae7fbf3bb099d4609.tar.bz2
portage-e49fb13e72b0d7f658a0015ae7fbf3bb099d4609.zip
Make EbuildBinpkg delegate everything up to src_install() to
the EbuildBuild class. svn path=/main/trunk/; revision=10839
-rw-r--r--pym/_emerge/__init__.py19
1 files changed, 17 insertions, 2 deletions
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: