aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-11-08 20:06:17 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-08 20:06:17 +0000
commit3a15cc2c588145d179d6cf48ba412b798e580a3e (patch)
tree5aced4ccf51dbbb57b33753a4cf0fb599801cb87
parent5b89f3bd40d17d06e3a1f26471461a3ae544c676 (diff)
downloadpaludis-3a15cc2c588145d179d6cf48ba412b798e580a3e.tar.gz
paludis-3a15cc2c588145d179d6cf48ba412b798e580a3e.tar.xz
Set appropriate compat* shopt
EAPI 6 specifies bash 4.2 instead of 3.2. The spec now recommends setting the compatibility level for both old and new EAPIs.
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh17
-rw-r--r--paludis/repositories/e/e_repository_TEST_6.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_6_setup.sh17
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/6.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
7 files changed, 55 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index c482655..57611e0 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -366,6 +366,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/bash-compat-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 3e546ff..9d43382 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -735,6 +735,23 @@ cat << 'END' > cat/default_src_prepare/files/first.patch || exit 1
+second
END
+mkdir -p "cat/bash-compat" || exit 1
+cat << 'END' > cat/bash-compat/bash-compat-5.ebuild || exit 1
+EAPI="5"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_setup() {
+ local compat=$(shopt | sed -n -e '/^compat/s/[ \t]\+on$//p')
+ [[ ${compat} == compat32 ]] || die compat=${compat}
+}
+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 0cda4f8..eac906c 100644
--- a/paludis/repositories/e/e_repository_TEST_6.cc
+++ b/paludis/repositories/e/e_repository_TEST_6.cc
@@ -697,5 +697,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/bash-compat-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 94d05cc..33e3d83 100755
--- a/paludis/repositories/e/e_repository_TEST_6_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_6_setup.sh
@@ -1943,5 +1943,22 @@ cat << 'END' > cat/default_src_prepare-empty-PATCHES-array/files/first.patch ||
+second
END
+mkdir -p "cat/bash-compat" || exit 1
+cat << 'END' > cat/bash-compat/bash-compat-6.ebuild || exit 1
+EAPI="6"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_setup() {
+ local compat=$(shopt | sed -n -e '/^compat/s/[ \t]\+on$//p')
+ [[ ${compat} == compat42 ]] || die compat=${compat}
+}
+END
+
cd ..
cd ..
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 60cb8e6..40a6a13 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -18,6 +18,7 @@ require_use_expand_in_iuse = false
profile_iuse_injection = false
support_eclasses = true
support_exlibs = false
+shell_options = compat32
utility_path_suffixes =
ebuild_module_suffixes = 0
f_function_prefix = ebuild_f
diff --git a/paludis/repositories/e/eapis/6.conf b/paludis/repositories/e/eapis/6.conf
index a9b1555..263bbda 100644
--- a/paludis/repositories/e/eapis/6.conf
+++ b/paludis/repositories/e/eapis/6.conf
@@ -9,6 +9,7 @@ is_pbin = false
ebuild_module_suffixes = 6 5 4 3 2 1 0
utility_path_suffixes = 6 5 4 3 2 1 0
+shell_options = compat42
shell_options_global = failglob
die_supports_dash_n = true
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 08f88c0..e6856c5 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -18,6 +18,7 @@ require_use_expand_in_iuse = false
profile_iuse_injection = false
support_eclasses = true
support_exlibs = false
+shell_options = compat32
utility_path_suffixes =
ebuild_module_suffixes = paludis-1 1 0
use_expand_separator = _