diff options
author | 2012-05-06 22:32:55 +0100 | |
---|---|---|
committer | 2012-05-12 11:33:36 +0100 | |
commit | 666e567c8a75123e4738b828dff4c35e1df86a99 (patch) | |
tree | 400258f8eefdd813a522c562b8f2ddde6e6b6ea4 /paludis/repositories/e | |
parent | a1ed48df1b0088b07981c55f8be4d7b3c4d3d57c (diff) | |
download | paludis-666e567c8a75123e4738b828dff4c35e1df86a99.tar.gz paludis-666e567c8a75123e4738b828dff4c35e1df86a99.tar.xz |
EAPI 5 has econf --disable-silent-rules
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r-- | paludis/repositories/e/e_repository_TEST_5.cc | 51 | ||||
-rwxr-xr-x | paludis/repositories/e/e_repository_TEST_5_setup.sh | 36 | ||||
-rw-r--r-- | paludis/repositories/e/eapis/5.conf | 2 |
3 files changed, 89 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc index 07532b7cf..d001f4fa9 100644 --- a/paludis/repositories/e/e_repository_TEST_5.cc +++ b/paludis/repositories/e/e_repository_TEST_5.cc @@ -89,6 +89,57 @@ namespace } } +TEST(ERepository, InstallEAPI5) +{ + TestEnvironment env; + std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>()); + keys->insert("format", "e"); + keys->insert("names_cache", "/var/empty"); + keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "repo")); + keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "repo/profiles/profile")); + keys->insert("layout", "traditional"); + keys->insert("eapi_when_unknown", "0"); + keys->insert("eapi_when_unspecified", "0"); + keys->insert("profile_eapi", "0"); + keys->insert("distdir", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "distdir")); + keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "build")); + std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env, + std::bind(from_keys, keys, std::placeholders::_1))); + env.add_repository(1, repo); + + std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>( + make_named_values<FakeInstalledRepositoryParams>( + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true + ))); + env.add_repository(2, installed_repo); + + InstallAction action(make_named_values<InstallActionOptions>( + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = std::make_shared<PackageIDSequence>(), + n::want_phase() = &want_all_phases + )); + + PretendAction pretend_action(make_named_values<PretendActionOptions>( + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::replacing() = std::make_shared<PackageIDSequence>() + )); + + { + const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( + PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-silent-rules-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) { FSPath root(FSPath::cwd() / "e_repository_TEST_5_dir" / "root"); diff --git a/paludis/repositories/e/e_repository_TEST_5_setup.sh b/paludis/repositories/e/e_repository_TEST_5_setup.sh index 021540e6d..791442898 100755 --- a/paludis/repositories/e/e_repository_TEST_5_setup.sh +++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh @@ -75,5 +75,41 @@ REQUIRED_USE="?? ( disabled1 enabled2 enabled3 )" S="${WORKDIR}" END +mkdir -p "cat/econf-disable-silent-rules" || exit 1 +cat << 'END' > cat/econf-disable-silent-rules/econf-disable-silent-rules-5.ebuild || exit 1 +EAPI="${PV}" +DESCRIPTION="The Description" +HOMEPAGE="http://example.com/" +SRC_URI="" +SLOT="0" +IUSE="spork" +LICENSE="GPL-2" +KEYWORDS="test" + +S="${WORKDIR}" + +src_unpack() { + mkdir -p ${WORKDIR} + cd "${WORKDIR}" + + cat <<'EOF' > configure +#!/bin/sh + +if echo "$@" | grep -q 'help' ; then + echo disable-silent-rules + exit 0 +fi + +if ! echo "$@" | grep -q 'disable-silent-rules' ; then + exit 1 +fi + +exit 0 +EOF + + chmod +x configure +} +END + cd .. cd .. diff --git a/paludis/repositories/e/eapis/5.conf b/paludis/repositories/e/eapis/5.conf index 3947268b9..225a3ad58 100644 --- a/paludis/repositories/e/eapis/5.conf +++ b/paludis/repositories/e/eapis/5.conf @@ -10,3 +10,5 @@ ebuild_module_suffixes = 5 4 3 2 1 0 utility_path_suffixes = 5 4 3 2 1 0 dependency_spec_tree_parse_options = ${dependency_spec_tree_parse_options} allow_at_most_one + +econf_extra_options_help_dependent = ${econf_extra_options_help_dependent} disable-silent-rules::--disable-silent-rules |