aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-03-01 15:22:32 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-03-01 15:22:32 +0000
commit96768e54e2fdfc526edd2e939f20203e43b25a36 (patch)
tree67ef14735f46b396eb65a3f7c76554e073953214
parent40ba4f033c892e0fc8ea779c697a86e9bf61cefd (diff)
downloadpaludis-96768e54e2fdfc526edd2e939f20203e43b25a36.tar.gz
paludis-96768e54e2fdfc526edd2e939f20203e43b25a36.tar.xz
Fix MERGE_TYPE
Unfortunately the test cases were broken in the same way as the feature itself, so it wasn't caught. Fixes: ticket:1323
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc3
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_4_setup.sh5
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash2
3 files changed, 6 insertions, 4 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index a59014d..caccf2c 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -301,7 +301,6 @@ TEST(ERepository, EAPI4MergeType)
n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
- ::setenv("EXPECTED_MERGE_TYPE", "source", 1);
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-4::test-repo",
@@ -371,7 +370,6 @@ TEST(ERepository, EAPI4MergeTypeBin)
n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
- ::setenv("EXPECTED_MERGE_TYPE", "buildonly", 1);
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::test-repo",
@@ -389,7 +387,6 @@ TEST(ERepository, EAPI4MergeTypeBin)
n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
- ::setenv("EXPECTED_MERGE_TYPE", "binary", 1);
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::binrepo",
diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh
index 81b6593..0c28acc 100755
--- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
@@ -956,6 +956,8 @@ KEYWORDS="test"
S="${WORKDIR}"
+EXPECTED_MERGE_TYPE=source
+
pkg_setup() {
if [[ ${EXPECTED_MERGE_TYPE} != ${MERGE_TYPE} ]] ; then
die ${EXPECTED_MERGE_TYPE} is not ${MERGE_TYPE}
@@ -975,10 +977,13 @@ KEYWORDS="test"
S="${WORKDIR}"
+EXPECTED_MERGE_TYPE=buildonly
+
pkg_setup() {
if [[ ${EXPECTED_MERGE_TYPE} != ${MERGE_TYPE} ]] ; then
die ${EXPECTED_MERGE_TYPE} is not ${MERGE_TYPE}
fi
+ EXPECTED_MERGE_TYPE=binary
}
END
mkdir -p "cat/required-use-all-good" || exit 1
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index a88554b..f4387e1 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -304,7 +304,7 @@ ebuild_scrub_environment()
echo "\${!${PALUDIS_CLIENT_UPPER}_CMDLINE_*} ${PALUDIS_CLIENT_UPPER}_OPTIONS" )
unset -v CATEGORY PN PV P PNV PVR PF PNVR
- unset -v ebuild EBUILD
+ unset -v ebuild EBUILD MERGE_TYPE
unset -v $(
for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
echo E_${v}