Merged from trunk 6507:6513
authorFabian Groffen <grobian@gentoo.org>
Thu, 10 May 2007 08:09:52 +0000 (08:09 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 10 May 2007 08:09:52 +0000 (08:09 -0000)
   +------------------------------------------------------------------------+
   | 6508    | Make sure USE=test is properly enabled when the test phase   |
   | zmedico | is forced via the ebuild command. Thanks to Caster for       |
   |         | reporting.                                                   |
   |---------+--------------------------------------------------------------|
   | 6511    | For bug #177763, document that FEATURES=keepwork can         |
   | zmedico | interfere with normal emerge operation.                      |
   |---------+--------------------------------------------------------------|
   | 6512    | fix typo from previous commit                                |
   | zmedico |                                                              |
   |---------+--------------------------------------------------------------|
   | 6513    | Make sure USE=test is properly enabled when the test phase   |
   | zmedico | is forced via the ebuild command, even when USE from         |
   |         | ${T}/environment doen't have it.                             |
   +------------------------------------------------------------------------+

svn path=/main/branches/prefix/; revision=6516

bin/ebuild
bin/ebuild.sh
man/make.conf.5
pym/portage/__init__.py

index e787d6ab8f089ad55ddb04439d7b1dd89cb95fbf..723c843dd00849ddf9290240536ffbdb77f5dd95 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 2ef23ecb4f4d32d00cde9a3739e78cf7af202598..6d59d51bcd963176e1d2a8e8bb4c4fef1fc32cef 100755 (executable)
@@ -944,7 +944,12 @@ dyn_compile() {
 }
 
 dyn_test() {
-       [ "${EBUILD_FORCE_TEST}" == "1" ] && rm -f "${PORTAGE_BUILDDIR}/.tested"
+       if [ "${EBUILD_FORCE_TEST}" == "1" ] ; then
+               rm -f "${PORTAGE_BUILDDIR}/.tested"
+               # If USE came from ${T}/environment then it might not have USE=test
+               # like it's supposed to here.
+               ! hasq test ${USE} && export USE="${USE} test"
+       fi
        [ "$(type -t pre_src_test)" == "function" ] && qa_call pre_src_test
        if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ]; then
                vecho ">>> It appears that ${PN} has already been tested; skipping."
index 632c7f1ec7fe7a113d4b6ad186f989da71405eda..064f855ad03b658f6fc9bd5abf4d3e6fed987dc1 100644 (file)
@@ -184,7 +184,10 @@ is set to include debug information (such as with the \-ggdb flag).
 Do not delete the ${T} directory after the merge process.
 .TP
 .B keepwork
-Do not delete the ${WORKDIR} directory after the merge process.
+Do not delete the ${WORKDIR} directory after the merge process.  This also
+disables most of the clean phase that is run prior to each build.  This causes it
+to interfere with normal emerge operation and therefore it should not be left
+enabled for more than a short period of time.
 .TP
 .B metadata\-transfer
 Automatically perform a metadata transfer when `emerge \-\-sync` is run.
index 12bb1e00bf97066f08be4776e70f47b62103b6c3..f40d40102ba2f4a4e57f35eec072424c874f5f51 100644 (file)
@@ -1996,6 +1996,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]