From: Fabian Groffen Date: Thu, 10 May 2007 08:09:52 +0000 (-0000) Subject: Merged from trunk 6507:6513 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=23c3047e71a7799fb8335ca4928d39deb4847842;p=portage.git Merged from trunk 6507:6513 +------------------------------------------------------------------------+ | 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 --- diff --git a/bin/ebuild b/bin/ebuild index e787d6ab8..723c843dd 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -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, diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 2ef23ecb4..6d59d51bc 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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." diff --git a/man/make.conf.5 b/man/make.conf.5 index 632c7f1ec..064f855ad 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -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. diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 12bb1e00b..f40d40102 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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]