Make sure FEATURES=test and USE=test are consistently enabled for all requested phase...
authorZac Medico <zmedico@gentoo.org>
Thu, 10 May 2007 18:15:20 +0000 (18:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 10 May 2007 18:15:20 +0000 (18:15 -0000)
svn path=/main/branches/2.1.2/; revision=6518

bin/ebuild

index f5ecf2374f1bd6835747268e86f2b2a2c9e633e7..b8b6cac414ac7617a17d4e5b7aa96a16a18c3865 100755 (executable)
@@ -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,