aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-09-09 18:16:01 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-09-09 18:16:01 +0100
commite446142987bae268abd3c27daf8a0216f6bdab14 (patch)
tree38f3833f2ee3798f39ed31d1c52d881c1cf80dc8
parent612c59bbbc5ead5a40c7d4970ac6fff486ab9c22 (diff)
downloadpaludis-e446142987bae268abd3c27daf8a0216f6bdab14.tar.gz
paludis-e446142987bae268abd3c27daf8a0216f6bdab14.tar.xz
Reinstate profile IUSE injection for EAPI 5
This sort-of reverts c8840c1, except for putting the removed bits back in EAPI 5-related files and updating the tests for API changes.
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_4_setup.sh55
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc27
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh58
-rw-r--r--paludis/repositories/e/eapis/5.conf10
4 files changed, 95 insertions, 55 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh
index 24482a5..c1f9e09 100755
--- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
@@ -927,61 +927,6 @@ EOF
chmod +x configure
}
END
-mkdir -p "cat/strict-use" || exit 1
-cat << 'END' > cat/strict-use/strict-use-4.ebuild || exit 1
-EAPI="4"
-DESCRIPTION="The Description"
-HOMEPAGE="http://example.com/"
-SRC_URI=""
-SLOT="0"
-IUSE="spork enabled"
-LICENSE="GPL-2"
-KEYWORDS="test"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- use enabled || die "enabled not enabled"
- use spork && die "sporks are bad"
-}
-END
-mkdir -p "cat/strict-use-fail" || exit 1
-cat << 'END' > cat/strict-use-fail/strict-use-fail-4.ebuild || exit 1
-EAPI="4"
-DESCRIPTION="The Description"
-HOMEPAGE="http://example.com/"
-SRC_URI=""
-SLOT="0"
-IUSE="spork enabled"
-LICENSE="GPL-2"
-KEYWORDS="test"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- use pony
-}
-END
-mkdir -p "cat/strict-use-injection" || exit 1
-cat << 'END' > cat/strict-use-injection/strict-use-injection-4.ebuild || exit 1
-EAPI="4"
-DESCRIPTION="The Description"
-HOMEPAGE="http://example.com/"
-SRC_URI=""
-SLOT="0"
-IUSE="spork enabled"
-LICENSE="GPL-2"
-KEYWORDS="test"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- use build && die "build set"
- use userland_GNU || die "userland_GNU not set"
- use cheese || die "cheese not set"
- use otherarch && die "otherarch set"
-}
-END
mkdir -p "cat/global-scope-use" || exit 1
cat << 'END' > cat/global-scope-use/global-scope-use-4.ebuild || exit 1
EAPI="4"
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index 9d700c9..7b391f4 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -138,6 +138,33 @@ TEST(ERepository, InstallEAPI5)
EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
id->perform_action(action);
}
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-5",
+ &env, { })), make_null_shared_ptr(), { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-fail-5",
+ &env, { })), make_null_shared_ptr(), { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-injection-5",
+ &env, { })), make_null_shared_ptr(), { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
}
TEST(ERepository, RequiredUse)
diff --git a/paludis/repositories/e/e_repository_TEST_5_setup.sh b/paludis/repositories/e/e_repository_TEST_5_setup.sh
index 52e73d5..b38a5ce 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -111,6 +111,64 @@ EOF
}
END
+mkdir -p "cat/strict-use" || exit 1
+cat << 'END' > cat/strict-use/strict-use-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork enabled"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ use enabled || die "enabled not enabled"
+ use spork && die "sporks are bad"
+}
+END
+
+mkdir -p "cat/strict-use-fail" || exit 1
+cat << 'END' > cat/strict-use-fail/strict-use-fail-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork enabled"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ use pony
+}
+END
+
+mkdir -p "cat/strict-use-injection" || exit 1
+cat << 'END' > cat/strict-use-injection/strict-use-injection-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork enabled"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ use build && die "build set"
+ use userland_GNU || die "userland_GNU not set"
+ use cheese || die "cheese not set"
+ use otherarch && die "otherarch set"
+}
+END
+
mkdir -p "cat/usex" || exit 1
cat << 'END' > cat/usex/usex-5.ebuild || exit 1
EAPI="5"
diff --git a/paludis/repositories/e/eapis/5.conf b/paludis/repositories/e/eapis/5.conf
index 42ea9bc..f413c91 100644
--- a/paludis/repositories/e/eapis/5.conf
+++ b/paludis/repositories/e/eapis/5.conf
@@ -6,6 +6,13 @@ exported_name = 5
can_be_pbin = true
is_pbin = false
+metadata_iuse_effective = IUSE_EFFECTIVE
+description_iuse_effective = All relevant USE flags
+flat_list_iuse_effective = -1
+description_iuse = Listed relevant USE flags
+
+vdb_from_env_variables = ${vdb_from_env_variables} IUSE_EFFECTIVE
+
ebuild_module_suffixes = 5 4 3 2 1 0
utility_path_suffixes = 5 4 3 2 1 0
@@ -19,3 +26,6 @@ best_has_version_host_root = true
econf_extra_options_help_dependent = ${econf_extra_options_help_dependent} disable-silent-rules::--disable-silent-rules
new_stdin = true
+require_use_expand_in_iuse = true
+profile_iuse_injection = true
+