summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-10 18:14:52 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-10 18:14:52 +0000
commit37a53269eb55b7140e0d419d39fdb15c9a6ab9e9 (patch)
tree14b86fcae983b0ccb8109c3271ee8d91eab74619 /bin
parent4fb5f6d9450dafa59792fe8bd63e3e4e5c7cec95 (diff)
downloadportage-37a53269eb55b7140e0d419d39fdb15c9a6ab9e9.tar.gz
portage-37a53269eb55b7140e0d419d39fdb15c9a6ab9e9.tar.bz2
portage-37a53269eb55b7140e0d419d39fdb15c9a6ab9e9.zip
Make sure FEATURES=test and USE=test are consistently enabled for all requested phases when the test phase is forced via the ebuild command.
svn path=/main/trunk/; revision=6517
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/ebuild b/bin/ebuild
index ce70c6f34..aafc69d3f 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -126,16 +126,17 @@ def discard_digests(myebuild, mysettings, mydbapi):
finally:
portage._doebuild_manifest_exempt_depend -= 1
+tmpsettings = portage.config(clone=portage.settings)
+if "test" in pargs and "test" not in tmpsettings.features:
+ print "Forcing test."
+ tmpsettings["EBUILD_FORCE_TEST"] = "1"
+ tmpsettings.backup_changes("EBUILD_FORCE_TEST")
+ tmpsettings.features.append("test")
+ tmpsettings["FEATURES"] = " ".join(tmpsettings.features)
+ tmpsettings.backup_changes("FEATURES")
+
for arg in pargs:
try:
- tmpsettings = portage.config(clone=portage.settings)
- if arg == "test" and not "test" in tmpsettings.features:
- print "Forcing test."
- tmpsettings["EBUILD_FORCE_TEST"] = "1"
- tmpsettings.backupenv["EBUILD_FORCE_TEST"] = "1"
- tmpsettings.features.append("test")
- tmpsettings["FEATURES"] = " ".join(tmpsettings.features)
- tmpsettings.backup_changes("FEATURES")
if arg == "digest" and force:
discard_digests(ebuild, tmpsettings, portage.portdb)
a = portage.doebuild(ebuild, arg, portage.root, tmpsettings,