summaryrefslogtreecommitdiffstats
path: root/bin/ebuild
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-10 18:15:20 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-10 18:15:20 +0000
commit69f742b38516b8cb744f5eb781a1df27809f23bc (patch)
treeafd22e5f5de54e90e5f311316111a376eda7fa15 /bin/ebuild
parent909e2f009419e7a3aff3007e682846030840fb9b (diff)
downloadportage-69f742b38516b8cb744f5eb781a1df27809f23bc.tar.gz
portage-69f742b38516b8cb744f5eb781a1df27809f23bc.tar.bz2
portage-69f742b38516b8cb744f5eb781a1df27809f23bc.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. (trunk r6516:6517)
svn path=/main/branches/2.1.2/; revision=6518
Diffstat (limited to 'bin/ebuild')
-rwxr-xr-xbin/ebuild17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/ebuild b/bin/ebuild
index f5ecf2374..b8b6cac41 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,