aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-11-05 18:19:07 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-05 18:19:07 +0000
commit55daefe197646bff5cfb39e63b9554528b74f0b4 (patch)
tree58aa9c2ac0d1a796146fddeb569ec953caedb4a4
parent53f810cb0be8b63a682770a96ada8695f1beef69 (diff)
downloadpaludis-55daefe197646bff5cfb39e63b9554528b74f0b4.tar.gz
paludis-55daefe197646bff5cfb39e63b9554528b74f0b4.tar.xz
EAPI 6 has eapply_user
Just a stub implementation for now.
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh18
-rw-r--r--paludis/repositories/e/e_repository_TEST_6.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_6_setup.sh19
-rw-r--r--paludis/repositories/e/ebuild/6/build_functions.bash5
5 files changed, 60 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index b7d3d36..0762d5a 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -348,6 +348,15 @@ 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/no-eapply_user-5",
+ &env, { })), nullptr, { }))]->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 0f20ed2..8f75332 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -686,6 +686,24 @@ src_prepare() {
}
END
+mkdir -p "cat/no-eapply_user" || exit 1
+cat << 'END' > cat/no-eapply_user/no-eapply_user-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_prepare() {
+ [[ -z $(declare -F eapply_user) ]] || die
+}
+END
+
mkdir -p "cat/subslots" || exit 1
cat << 'END' > cat/subslots/subslots-5.ebuild || exit 1
EAPI="5"
diff --git a/paludis/repositories/e/e_repository_TEST_6.cc b/paludis/repositories/e/e_repository_TEST_6.cc
index 15a9008..654ef93 100644
--- a/paludis/repositories/e/e_repository_TEST_6.cc
+++ b/paludis/repositories/e/e_repository_TEST_6.cc
@@ -643,5 +643,14 @@ TEST(ERepository, InstallEAPI6)
EXPECT_EQ("6", 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/eapply_user-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ id->perform_action(action);
+ }
}
diff --git a/paludis/repositories/e/e_repository_TEST_6_setup.sh b/paludis/repositories/e/e_repository_TEST_6_setup.sh
index 52ae5f1..7fe6bcc 100755
--- a/paludis/repositories/e/e_repository_TEST_6_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_6_setup.sh
@@ -1743,5 +1743,24 @@ cat << 'END' > cat/eapply-dir-nopatches/files/subdir/first.patch~ || exit 1
+second
END
+mkdir -p "cat/eapply_user" || exit 1
+cat << 'END' > cat/eapply_user/eapply_user-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+S=${WORKDIR}
+
+src_prepare() {
+ [[ -n $(declare -F eapply_user) ]] || die not defined
+ eapply_user || die eapply_user
+}
+END
+
cd ..
cd ..
diff --git a/paludis/repositories/e/ebuild/6/build_functions.bash b/paludis/repositories/e/ebuild/6/build_functions.bash
index 8420a36..8a1dfb6 100644
--- a/paludis/repositories/e/ebuild/6/build_functions.bash
+++ b/paludis/repositories/e/ebuild/6/build_functions.bash
@@ -73,6 +73,11 @@ eapply()
}
ebuild_need_extglob eapply
+eapply_user()
+{
+ return 0
+}
+
einstall()
{
die "einstall is banned in EAPI 6"