Make sure USE=test is properly enabled when the test phase is forced via the ebuild...
authorZac Medico <zmedico@gentoo.org>
Wed, 9 May 2007 22:50:49 +0000 (22:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 9 May 2007 22:50:49 +0000 (22:50 -0000)
svn path=/main/branches/2.1.2/; revision=6509

bin/ebuild
pym/portage.py

index bb38911f75431a4e31aab9fe880777bbf320bb7a..f5ecf2374f1bd6835747268e86f2b2a2c9e633e7 100755 (executable)
@@ -133,6 +133,9 @@ for arg in pargs:
                        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,
index 360abe4c1edad3ee451b3e533a1e379bb101a148..bbb27fc14acb8cdd00069e0d32fc873c3c17d4af 100644 (file)
@@ -1920,6 +1920,8 @@ class config:
                # FEATURES=test should imply USE=test
                if "test" in self.configlist[-1].get("FEATURES","").split():
                        myflags.add("test")
+                       if self.get("EBUILD_FORCE_TEST") == "1":
+                               self.usemask.discard("test")
 
                usesplit = [ x for x in myflags if \
                        x not in self.usemask]