aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-09-15 17:50:18 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-09-15 17:50:18 +0100
commit94a1821fb75a519d9cc482077d109803e76d95c2 (patch)
treeb2b4b030d110f34644665ccf94b540ed8313fbb5
parent6e1e0d048c6b6e196f6c4788a1896ae076b87019 (diff)
downloadpaludis-94a1821fb75a519d9cc482077d109803e76d95c2.tar.gz
paludis-94a1821fb75a519d9cc482077d109803e76d95c2.tar.xz
Revert "Stub implementation of apply_user_patches for EAPI 5"
The Council chose to drop this feature from EAPI 5, possibly to be reinstated in future. This reverts commit 9b9e198770c3980d8db91997af348f0b07fbf99e. Conflicts: paludis/repositories/e/e_repository_TEST_5_setup.sh
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_4_setup.sh1
-rw-r--r--paludis/repositories/e/e_repository_TEST_5.cc27
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_5_setup.sh54
-rw-r--r--paludis/repositories/e/eapis/5.conf2
-rw-r--r--paludis/repositories/e/ebuild/5/Makefile.am2
-rw-r--r--paludis/repositories/e/ebuild/5/apply_user_patches.bash28
-rw-r--r--paludis/repositories/e/ebuild/5/src_prepare.bash69
7 files changed, 1 insertions, 182 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh
index e9205bd..27b13de 100755
--- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
@@ -1156,7 +1156,6 @@ pkg_pretend() {
[[ -z $(type -t doheader) ]] || die
[[ -z $(type -t newheader) ]] || die
[[ -z ${EBUILD_PHASE_FUNC} ]] || die
- [[ -z $(type -t apply_user_patches) ]] || die
}
END
mkdir -p "cat/no-new-stdin"
diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc
index 0c34243..272df7b 100644
--- a/paludis/repositories/e/e_repository_TEST_5.cc
+++ b/paludis/repositories/e/e_repository_TEST_5.cc
@@ -214,33 +214,6 @@ TEST(ERepository, InstallEAPI5)
id->perform_action(pretend_action);
ASSERT_TRUE(! pretend_action.failed());
}
-
- {
- const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat/apply-user-patches-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);
- }
-
- {
- const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat/apply-user-patches-default-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);
- }
-
- {
- const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat/apply-user-patches-uncalled-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());
- EXPECT_THROW(id->perform_action(action), ActionFailedError);
- }
}
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 86aa5f8..7c4bba0 100755
--- a/paludis/repositories/e/e_repository_TEST_5_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh
@@ -360,60 +360,6 @@ pkg_pretend() {
}
END
-mkdir -p "cat/apply-user-patches" || exit 1
-cat << 'END' > cat/apply-user-patches/apply-user-patches-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() {
- apply_user_patches && die
-}
-END
-
-mkdir -p "cat/apply-user-patches-default" || exit 1
-cat << 'END' > cat/apply-user-patches-default/apply-user-patches-default-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() {
- default
-}
-END
-
-mkdir -p "cat/apply-user-patches-uncalled" || exit 1
-cat << 'END' > cat/apply-user-patches-uncalled/apply-user-patches-uncalled-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() {
- :
-}
-END
-
mkdir -p "cat/subslots" || exit 1
cat << 'END' > cat/subslots/subslots-5.ebuild || exit 1
EAPI="5"
diff --git a/paludis/repositories/e/eapis/5.conf b/paludis/repositories/e/eapis/5.conf
index d78733c..b09e5b0 100644
--- a/paludis/repositories/e/eapis/5.conf
+++ b/paludis/repositories/e/eapis/5.conf
@@ -21,7 +21,7 @@ utility_path_suffixes = 5 4 3 2 1 0
dependency_spec_tree_parse_options = ${dependency_spec_tree_parse_options} allow_at_most_one
-load_modules = ${load_modules} usex apply_user_patches
+load_modules = ${load_modules} usex
use_stable_mask_force = true
diff --git a/paludis/repositories/e/ebuild/5/Makefile.am b/paludis/repositories/e/ebuild/5/Makefile.am
index 95e8612..fbcb919 100644
--- a/paludis/repositories/e/ebuild/5/Makefile.am
+++ b/paludis/repositories/e/ebuild/5/Makefile.am
@@ -5,9 +5,7 @@ SUBDIRS = .
libexecprog5dir = $(libexecdir)/paludis/5
libexecprog5_SCRIPTS = \
- src_prepare.bash \
src_test.bash \
- apply_user_patches.bash \
usex.bash \
output_functions.bash
diff --git a/paludis/repositories/e/ebuild/5/apply_user_patches.bash b/paludis/repositories/e/ebuild/5/apply_user_patches.bash
deleted file mode 100644
index 037aede..0000000
--- a/paludis/repositories/e/ebuild/5/apply_user_patches.bash
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-# Copyright (c) 2012 David Leverton
-#
-# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
-# Gentoo Foundation and distributed under the terms of the GNU General
-# Public License v2.
-#
-# 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
-
-apply_user_patches()
-{
- touch "${T}"/paludis-apply_user_patches-called
- return 1
-}
-
diff --git a/paludis/repositories/e/ebuild/5/src_prepare.bash b/paludis/repositories/e/ebuild/5/src_prepare.bash
deleted file mode 100644
index 3bf9bd3..0000000
--- a/paludis/repositories/e/ebuild/5/src_prepare.bash
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-# Copyright (c) 2006, 2007, 2009 Ciaran McCreesh
-# Copyright (c) 2008, 2012 David Leverton
-#
-# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
-# Gentoo Foundation and distributed under the terms of the GNU General
-# Public License v2.
-#
-# 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
-
-default_src_prepare()
-{
- apply_user_patches
-}
-
-src_prepare()
-{
- default_src_prepare
-}
-
-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
-
- if hasq "prepare" ${SKIP_FUNCTIONS} ; then
- ebuild_section "Skipping src_prepare (SKIP_FUNCTIONS)"
- else
- if [[ $(type -t pre_src_prepare ) == "function" ]] ; then
- ebuild_section "Starting pre_src_prepare"
- pre_src_prepare
- ebuild_section "Done pre_src_prepare"
- fi
-
- rm -f "${T}"/paludis-apply_user_patches-called
-
- ebuild_section "Starting src_prepare"
- src_prepare
- ebuild_section "Done src_prepare"
-
- [[ -f "${T}"/paludis-apply_user_patches-called ]] \
- || die "apply_user_patches must be called during src_prepare"
-
- if [[ $(type -t post_src_prepare ) == "function" ]] ; then
- ebuild_section "Starting post_src_prepare"
- post_src_prepare
- ebuild_section "Done post_src_prepare"
- fi
- fi
-}
-