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:49:47 +0000 (22:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 9 May 2007 22:49:47 +0000 (22:49 -0000)
svn path=/main/trunk/; revision=6508

bin/ebuild
pym/portage/__init__.py

index c5f58ba82142611f68823d7ba7b9fef23dfeb85b..ce70c6f3435dffce3c7388f234beaef032f983d4 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 ac3b79bc21c06b17703e05f6aa993fc191ea7a77..c762638993d071831567a566d27cb1e73ffe015f 100644 (file)
@@ -1987,6 +1987,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]