aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-11 14:50:12 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-11 14:58:01 +0100
commitc2d9c202a7ea9f85875024bde38da7d8d034aef7 (patch)
tree900844f5bcd8e8209fc6bb927cbd5338be270a67
parentc5891e01e70bfc22db18c91d3663b2b6e428e4fd (diff)
downloadpaludis-c2d9c202a7ea9f85875024bde38da7d8d034aef7.tar.gz
paludis-c2d9c202a7ea9f85875024bde38da7d8d034aef7.tar.xz
EAPI 3 has restricted S to WORKDIR fallback
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh14
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.hh2
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/3.conf1
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild/0/src_compile.bash4
-rw-r--r--paludis/repositories/e/ebuild/0/src_install.bash4
-rw-r--r--paludis/repositories/e/ebuild/2/src_compile.bash4
-rw-r--r--paludis/repositories/e/ebuild/2/src_configure.bash4
-rw-r--r--paludis/repositories/e/ebuild/2/src_prepare.bash4
-rw-r--r--paludis/repositories/e/ebuild/3/src_install.bash2
-rwxr-xr-xpaludis/repositories/e/vdb_repository_TEST_setup.sh1
15 files changed, 41 insertions, 5 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 41f46bc..15c7c27 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -1255,6 +1255,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="3"
+S="${WORKDIR}"
+
src_unpack() {
mkdir -p ${WORKDIR}
cat <<'EOF' >${WORKDIR}/Makefile
@@ -1289,6 +1291,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="3"
+S="${WORKDIR}"
+
src_install() {
docompress foo || die
docompress bar || die
@@ -1306,6 +1310,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="3"
+S="${WORKDIR}"
+
src_unpack() {
mkdir -p ${WORKDIR}
cd "${WORKDIR}"
@@ -1344,6 +1350,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="3"
+S="${WORKDIR}"
+
src_unpack() {
mkdir -p ${WORKDIR}
cd "${WORKDIR}"
@@ -1374,6 +1382,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="3"
+S="\${WORKDIR}"
+
src_install() {
touch foo
dohard foo bar
@@ -1391,6 +1401,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="0"
+S="${WORKDIR}"
+
src_unpack() {
mkdir -p ${WORKDIR}
cd "${WORKDIR}"
@@ -1419,6 +1431,8 @@ LICENSE="GPL-2"
KEYWORDS="test"
EAPI="3"
+S="${WORKDIR}"
+
src_unpack() {
mkdir -p ${WORKDIR}
cd "${WORKDIR}"
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 6327654..f09c7b6 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -161,6 +161,7 @@ namespace
value_for<n::load_modules>(check_get(k, "load_modules")),
value_for<n::must_not_change_after_source_variables>(check_get(k, "must_not_change_after_source_variables")),
value_for<n::must_not_change_variables>(check_get(k, "must_not_change_variables")),
+ value_for<n::no_s_workdir_fallback>(destringify_key<bool>(k, "no_s_workdir_fallback")),
value_for<n::non_empty_variables>(check_get(k, "non_empty_variables")),
value_for<n::rdepend_defaults_to_depend>(destringify_key<bool>(k, "rdepend_defaults_to_depend")),
value_for<n::require_use_expand_in_iuse>(destringify_key<bool>(k, "require_use_expand_in_iuse")),
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index 9a1adb9..715f345 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -127,6 +127,7 @@ namespace paludis
struct must_not_change_after_source_variables;
struct must_not_change_variables;
struct name;
+ struct no_s_workdir_fallback;
struct no_slot_or_repo;
struct non_empty_variables;
struct package_dep_spec_parse_options;
@@ -347,6 +348,7 @@ namespace paludis
NamedValue<n::load_modules, std::string> load_modules;
NamedValue<n::must_not_change_after_source_variables, std::string> must_not_change_after_source_variables;
NamedValue<n::must_not_change_variables, std::string> must_not_change_variables;
+ NamedValue<n::no_s_workdir_fallback, bool> no_s_workdir_fallback;
NamedValue<n::non_empty_variables, std::string> non_empty_variables;
NamedValue<n::rdepend_defaults_to_depend, bool> rdepend_defaults_to_depend;
NamedValue<n::require_use_expand_in_iuse, bool> require_use_expand_in_iuse;
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 2b49e00..21c7878 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -258,6 +258,7 @@ dodoc_r = false
doins_r_symlink = false
dosym_mkdir = true
failure_is_fatal = false
+no_s_workdir_fallback = false
unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z
diff --git a/paludis/repositories/e/eapis/3.conf b/paludis/repositories/e/eapis/3.conf
index 47105ed..c8dacff 100644
--- a/paludis/repositories/e/eapis/3.conf
+++ b/paludis/repositories/e/eapis/3.conf
@@ -43,6 +43,7 @@ ebuild_pretend = \
dodoc_r = true
doins_r_symlink = true
failure_is_fatal = true
+no_s_workdir_fallback = true
rdepend_defaults_to_depend = false
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 3c2e934..4833d1e 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -311,6 +311,7 @@ dodoc_r = false
dosym_mkdir = false
doins_r_symlink = false
failure_is_fatal = true
+no_s_workdir_fallback = true
unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z tar.xz xz
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 9ae00a6..c2a13e1 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -27,6 +27,7 @@ userpriv_cannot_use_root = false
has_optional_tests = false
has_recommended_tests = true
has_slow_tests = false
+no_s_workdir_fallback = false
vdb_from_env_variables = \
CATEGORY CHOST COUNTER DEPEND DESCRIPTION EAPI FEATURES \
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index a796141..8e2050e 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -193,6 +193,8 @@ EbuildCommand::operator() ()
params.package_id()->eapi()->supported()->ebuild_options()->load_modules())
.with_setenv("PALUDIS_EBUILD_FUNCTIONS",
params.package_id()->eapi()->supported()->ebuild_options()->ebuild_functions())
+ .with_setenv("PALUDIS_NO_S_WORKDIR_FALLBACK",
+ params.package_id()->eapi()->supported()->ebuild_options()->no_s_workdir_fallback() ? "yes" : "")
.with_setenv("PALUDIS_BINARY_DISTDIR_VARIABLE",
params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_distdir())
.with_setenv("PALUDIS_ECONF_EXTRA_OPTIONS",
diff --git a/paludis/repositories/e/ebuild/0/src_compile.bash b/paludis/repositories/e/ebuild/0/src_compile.bash
index b48a701..4dcf9cd 100644
--- a/paludis/repositories/e/ebuild/0/src_compile.bash
+++ b/paludis/repositories/e/ebuild/0/src_compile.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -32,6 +32,8 @@ ebuild_f_compile()
{
if [[ -d "${S}" ]] ; then
cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
elif [[ -d "${WORKDIR}" ]] ; then
cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
fi
diff --git a/paludis/repositories/e/ebuild/0/src_install.bash b/paludis/repositories/e/ebuild/0/src_install.bash
index 1939c50..1844842 100644
--- a/paludis/repositories/e/ebuild/0/src_install.bash
+++ b/paludis/repositories/e/ebuild/0/src_install.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -29,6 +29,8 @@ ebuild_f_install()
{
if [[ -d "${S}" ]] ; then
cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
elif [[ -d "${WORKDIR}" ]] ; then
cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
fi
diff --git a/paludis/repositories/e/ebuild/2/src_compile.bash b/paludis/repositories/e/ebuild/2/src_compile.bash
index 21c3881..daa1420 100644
--- a/paludis/repositories/e/ebuild/2/src_compile.bash
+++ b/paludis/repositories/e/ebuild/2/src_compile.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
# Copyright (c) 2008 David Leverton
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
@@ -37,6 +37,8 @@ ebuild_f_compile()
{
if [[ -d "${S}" ]] ; then
cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
elif [[ -d "${WORKDIR}" ]] ; then
cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
fi
diff --git a/paludis/repositories/e/ebuild/2/src_configure.bash b/paludis/repositories/e/ebuild/2/src_configure.bash
index e012f80..473f736 100644
--- a/paludis/repositories/e/ebuild/2/src_configure.bash
+++ b/paludis/repositories/e/ebuild/2/src_configure.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
# Copyright (c) 2008 David Leverton
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
@@ -35,6 +35,8 @@ ebuild_f_configure()
{
if [[ -d "${S}" ]] ; then
cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
elif [[ -d "${WORKDIR}" ]] ; then
cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
fi
diff --git a/paludis/repositories/e/ebuild/2/src_prepare.bash b/paludis/repositories/e/ebuild/2/src_prepare.bash
index 876d930..886ed5b 100644
--- a/paludis/repositories/e/ebuild/2/src_prepare.bash
+++ b/paludis/repositories/e/ebuild/2/src_prepare.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
# Copyright (c) 2008 David Leverton
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
@@ -35,6 +35,8 @@ ebuild_f_prepare()
{
if [[ -d "${S}" ]] ; then
cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
elif [[ -d "${WORKDIR}" ]] ; then
cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
fi
diff --git a/paludis/repositories/e/ebuild/3/src_install.bash b/paludis/repositories/e/ebuild/3/src_install.bash
index a7cd493..d768433 100644
--- a/paludis/repositories/e/ebuild/3/src_install.bash
+++ b/paludis/repositories/e/ebuild/3/src_install.bash
@@ -47,6 +47,8 @@ ebuild_f_install()
{
if [[ -d "${S}" ]] ; then
cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ elif [[ -n "${PALUDIS_NO_S_WORKDIR_FALLBACK}" ]] ; then
+ die "\${S} (\"${S}\") does not exist"
elif [[ -d "${WORKDIR}" ]] ; then
cd "${WORKDIR}" || die "cd to \${WORKDIR} (\"${WORKDIR}\") failed"
fi
diff --git a/paludis/repositories/e/vdb_repository_TEST_setup.sh b/paludis/repositories/e/vdb_repository_TEST_setup.sh
index b213138..76ad7ff 100755
--- a/paludis/repositories/e/vdb_repository_TEST_setup.sh
+++ b/paludis/repositories/e/vdb_repository_TEST_setup.sh
@@ -175,6 +175,7 @@ IUSE=""
LICENSE="GPL-2"
KEYWORDS="test"
DEPEND="foo/bar"
+S="${WORKDIR}"
src_install() {
echo MONKEY > ${D}/monkey