aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-11-01 20:57:28 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-05 17:37:28 +0000
commit96cdd89b701a63e45478890d4faf6f1c22fb6264 (patch)
tree0fac6fb1bea208fe48e8965e36451357270c5812
parentd9fa141466ccba61fd00ac3c0430b77ac7966084 (diff)
downloadpaludis-96cdd89b701a63e45478890d4faf6f1c22fb6264.tar.gz
paludis-96cdd89b701a63e45478890d4faf6f1c22fb6264.tar.xz
EAPI 6 bans einstall
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh22
-rw-r--r--paludis/repositories/e/e_repository_TEST_6.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_6_setup.sh22
-rw-r--r--paludis/repositories/e/ebuild/6/Makefile.am1
-rw-r--r--paludis/repositories/e/ebuild/6/build_functions.bash25
6 files changed, 88 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index 9a3bb96..90fb618 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -303,6 +303,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/has-einstall-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 ee132fc..9a266b3 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -577,6 +577,28 @@ src_configure() {
}
END
+mkdir -p "cat/has-einstall" || exit 1
+cat << 'END' > cat/has-einstall/has-einstall-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_unpack() {
+ echo 'install: ; true' >Makefile
+}
+
+src_install() {
+ einstall
+}
+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 39dc998..b3a763b 100644
--- a/paludis/repositories/e/e_repository_TEST_6.cc
+++ b/paludis/repositories/e/e_repository_TEST_6.cc
@@ -311,5 +311,14 @@ TEST(ERepository, InstallEAPI6)
EXPECT_EQ("6", 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-einstall-6",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("6", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value());
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
}
diff --git a/paludis/repositories/e/e_repository_TEST_6_setup.sh b/paludis/repositories/e/e_repository_TEST_6_setup.sh
index 5913ff3..67f82a1 100755
--- a/paludis/repositories/e/e_repository_TEST_6_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_6_setup.sh
@@ -519,5 +519,27 @@ src_configure() {
}
END
+mkdir -p "cat/no-einstall" || exit 1
+cat << 'END' > cat/no-einstall/no-einstall-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_unpack() {
+ echo 'install: ; true' >Makefile
+}
+
+src_install() {
+ einstall
+}
+END
+
cd ..
cd ..
diff --git a/paludis/repositories/e/ebuild/6/Makefile.am b/paludis/repositories/e/ebuild/6/Makefile.am
index e7737e4..6cedca5 100644
--- a/paludis/repositories/e/ebuild/6/Makefile.am
+++ b/paludis/repositories/e/ebuild/6/Makefile.am
@@ -5,6 +5,7 @@ SUBDIRS = .
libexecprog6dir = $(libexecdir)/paludis/6
libexecprog6_SCRIPTS = \
+ build_functions.bash \
multilib_functions.bash \
output_functions.bash
diff --git a/paludis/repositories/e/ebuild/6/build_functions.bash b/paludis/repositories/e/ebuild/6/build_functions.bash
new file mode 100644
index 0000000..b51b5f8
--- /dev/null
+++ b/paludis/repositories/e/ebuild/6/build_functions.bash
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2015 David Leverton
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_load_module --older build_functions
+
+einstall()
+{
+ die "einstall is banned in EAPI 6"
+}
+