mgorny 15/03/29 18:30:52
Added: paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch
paludis-2.2.0-fix-MERGE_TYPE.patch
paludis-2.2.0-fix-PWD-handling.patch
paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch
paludis-2.2.0-filter-IUSE_EFFECTIVE.patch
Log:
Backport some EAPI support bugfixes.
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key
EFB4464E!)
Revision Changes Path
1.1
sys-apps/paludis/files/paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch?rev=1.1&content-type=text/plain
Index: paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch
===================================================================
>From bfb1bd7682b4a678cfa7dccb87d1f49d842317ac Mon Sep 17 00:00:00 2001
From: David Leverton <[email protected]>
Date: Sat, 21 Mar 2015 20:04:30 +0000
Subject: Only check IUSE_EFFECTIVE for EAPI 5
In other EAPIs the value isn't set by C++, and therefore may leak in
from the calling environment.
diff --git a/paludis/repositories/e/ebuild/0/list_functions.bash
b/paludis/repositories/e/ebuild/0/list_functions.bash
index 0c5d91a..4998c2b 100644
--- a/paludis/repositories/e/ebuild/0/list_functions.bash
+++ b/paludis/repositories/e/ebuild/0/list_functions.bash
@@ -37,13 +37,6 @@ usev()
useq()
{
- if [[ -n "${IUSE_EFFECTIVE:+x}" ]] ; then
- local i=( $IUSE_EFFECTIVE )
- if ! hasq ${1#!} "${i[@]#[+-]}" ; then
- die "Flag '${1#!}' is not included in
IUSE_EFFECTIVE=\"${IUSE_EFFECTIVE}\""
- fi
- fi
-
if [[ "${1:0:1}" == "!" ]] ; then
! hasq "${1#!}" "${USE}"
else
diff --git a/paludis/repositories/e/ebuild/5/Makefile.am
b/paludis/repositories/e/ebuild/5/Makefile.am
index fbcb919..ced4e53 100644
--- a/paludis/repositories/e/ebuild/5/Makefile.am
+++ b/paludis/repositories/e/ebuild/5/Makefile.am
@@ -7,6 +7,7 @@ libexecprog5dir = $(libexecdir)/paludis/5
libexecprog5_SCRIPTS = \
src_test.bash \
usex.bash \
+ list_functions.bash \
output_functions.bash
TESTS =
diff --git a/paludis/repositories/e/ebuild/5/list_functions.bash
b/paludis/repositories/e/ebuild/5/list_functions.bash
new file mode 100644
index 0000000..7cb22ad
--- /dev/null
+++ b/paludis/repositories/e/ebuild/5/list_functions.bash
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2009, 2012 Ciaran McCreesh
+# Copyright (c) 2015 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
+
+ebuild_load_module --older list_functions
+
+useq()
+{
+ if [[ -n "${IUSE_EFFECTIVE:+x}" ]] ; then
+ local i=( $IUSE_EFFECTIVE )
+ if ! hasq ${1#!} "${i[@]#[+-]}" ; then
+ die "Flag '${1#!}' is not included in
IUSE_EFFECTIVE=\"${IUSE_EFFECTIVE}\""
+ fi
+ fi
+
+ if [[ "${1:0:1}" == "!" ]] ; then
+ ! hasq "${1#!}" "${USE}"
+ else
+ hasq "${1}" "${USE}"
+ fi
+}
+
--
cgit v0.10.2
1.1 sys-apps/paludis/files/paludis-2.2.0-fix-MERGE_TYPE.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-fix-MERGE_TYPE.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-fix-MERGE_TYPE.patch?rev=1.1&content-type=text/plain
Index: paludis-2.2.0-fix-MERGE_TYPE.patch
===================================================================
>From 96768e54e2fdfc526edd2e939f20203e43b25a36 Mon Sep 17 00:00:00 2001
From: David Leverton <[email protected]>
Date: Sun, 1 Mar 2015 15:22:32 +0000
Subject: Fix MERGE_TYPE
Unfortunately the test cases were broken in the same way as the
feature itself, so it wasn't caught.
Fixes: ticket:1323
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc
b/paludis/repositories/e/e_repository_TEST_4.cc
index a59014d..caccf2c 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -301,7 +301,6 @@ TEST(ERepository, EAPI4MergeType)
n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
- ::setenv("EXPECTED_MERGE_TYPE", "source", 1);
const std::shared_ptr<const PackageID>
id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-4::test-repo",
@@ -371,7 +370,6 @@ TEST(ERepository, EAPI4MergeTypeBin)
n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
- ::setenv("EXPECTED_MERGE_TYPE", "buildonly", 1);
const std::shared_ptr<const PackageID>
id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::test-repo",
@@ -389,7 +387,6 @@ TEST(ERepository, EAPI4MergeTypeBin)
n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
- ::setenv("EXPECTED_MERGE_TYPE", "binary", 1);
const std::shared_ptr<const PackageID>
id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::binrepo",
diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh
b/paludis/repositories/e/e_repository_TEST_4_setup.sh
index 81b6593..0c28acc 100755
--- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
@@ -956,6 +956,8 @@ KEYWORDS="test"
S="${WORKDIR}"
+EXPECTED_MERGE_TYPE=source
+
pkg_setup() {
if [[ ${EXPECTED_MERGE_TYPE} != ${MERGE_TYPE} ]] ; then
die ${EXPECTED_MERGE_TYPE} is not ${MERGE_TYPE}
@@ -975,10 +977,13 @@ KEYWORDS="test"
S="${WORKDIR}"
+EXPECTED_MERGE_TYPE=buildonly
+
pkg_setup() {
if [[ ${EXPECTED_MERGE_TYPE} != ${MERGE_TYPE} ]] ; then
die ${EXPECTED_MERGE_TYPE} is not ${MERGE_TYPE}
fi
+ EXPECTED_MERGE_TYPE=binary
}
END
mkdir -p "cat/required-use-all-good" || exit 1
diff --git a/paludis/repositories/e/ebuild/ebuild.bash
b/paludis/repositories/e/ebuild/ebuild.bash
index a88554b..f4387e1 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -304,7 +304,7 @@ ebuild_scrub_environment()
echo "\${!${PALUDIS_CLIENT_UPPER}_CMDLINE_*}
${PALUDIS_CLIENT_UPPER}_OPTIONS" )
unset -v CATEGORY PN PV P PNV PVR PF PNVR
- unset -v ebuild EBUILD
+ unset -v ebuild EBUILD MERGE_TYPE
unset -v $(
for v in ${PALUDIS_SOURCE_MERGED_VARIABLES}
${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
echo E_${v}
--
cgit v0.10.2
1.1 sys-apps/paludis/files/paludis-2.2.0-fix-PWD-handling.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-fix-PWD-handling.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-fix-PWD-handling.patch?rev=1.1&content-type=text/plain
Index: paludis-2.2.0-fix-PWD-handling.patch
===================================================================
>From f9b2434560399b00f7de479474f8f22fc0271e77 Mon Sep 17 00:00:00 2001
From: Georgi Georgiev <[email protected]>
Date: Tue, 10 Mar 2015 00:38:36 +0900
Subject: PWD is a special variable, we should leave its value alone
Bash sets the value of PWD to the current working directory. It is not a
good idea to change that variable without actually changing the
directory. This would happen if the working directory changes between
saving and loading the environment (saving - when building a PBIN, and
loading - when installing it for example), so better let bash handle
this variable.
Fixes: ticket:1325
diff --git a/paludis/repositories/e/ebuild/source_functions.bash
b/paludis/repositories/e/ebuild/source_functions.bash
index 58b9327..5bfb251 100755
--- a/paludis/repositories/e/ebuild/source_functions.bash
+++ b/paludis/repositories/e/ebuild/source_functions.bash
@@ -37,7 +37,7 @@ ebuild_need_extglob()
ebuild_safe_source()
{
set -- "${@}" '[^a-zA-Z_]*' '*[^a-zA-Z0-9_]*' \
- EUID PPID UID FUNCNAME GROUPS SHELLOPTS BASHOPTS BASHPID IFS \
+ EUID PPID UID FUNCNAME GROUPS SHELLOPTS BASHOPTS BASHPID IFS PWD \
'BASH_@(ARGC|ARGV|LINENO|SOURCE|VERSINFO|REMATCH)' \
'BASH_COMPLETION?(_DIR)' 'bash+([0-9])?([a-z])' \
EBUILD_KILL_PID PALUDIS_LOADSAVEENV_DIR PALUDIS_DO_NOTHING_SANDBOXY
SANDBOX_ACTIVE \
--
cgit v0.10.2
1.1
sys-apps/paludis/files/paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch?rev=1.1&content-type=text/plain
Index: paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch
===================================================================
>From dccb65acba7684c97675473fec5120e3aa55d2d0 Mon Sep 17 00:00:00 2001
From: David Leverton <[email protected]>
Date: Sun, 29 Mar 2015 18:36:02 +0100
Subject: Fix EBUILD_PHASE_FUNC leakage
diff --git a/paludis/repositories/e/ebuild/ebuild.bash
b/paludis/repositories/e/ebuild/ebuild.bash
index 24a93d4..b856bad 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -76,7 +76,7 @@ ebuild_sanitise_envvars
# fancy fake variables
EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE IUSE_EFFECTIVE SRC_URI
DOWNLOADS RESTRICT \
LICENSE LICENCES KEYWORDS INHERITED PROVIDE HOMEPAGE DESCRIPTION
DEPENDENCIES \
- E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS DEFINED_PHASES \
+ E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS DEFINED_PHASES
EBUILD_PHASE_FUNC \
MYOPTIONS E_MYOPTIONS E_DEPENDENCIES BINARY_KEYWORDS BINARY_URI \
GENERATED_USING GENERATED_TIME GENERATED_FROM_REPOSITORY BINARY_PLATFORMS
REMOTE_IDS \
SUMMARY BUGS_TO UPSTREAM_DOCUMENTATION UPSTREAM_CHANGELOG \
--
cgit v0.10.2
1.1
sys-apps/paludis/files/paludis-2.2.0-filter-IUSE_EFFECTIVE.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-filter-IUSE_EFFECTIVE.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.2.0-filter-IUSE_EFFECTIVE.patch?rev=1.1&content-type=text/plain
Index: paludis-2.2.0-filter-IUSE_EFFECTIVE.patch
===================================================================
>From ef6930e03428ec512c9d564886c06078e5238d45 Mon Sep 17 00:00:00 2001
From: David Leverton <[email protected]>
Date: Sat, 21 Mar 2015 19:38:52 +0000
Subject: Add IUSE_EFFECTIVE to EBUILD_METADATA_VARIABLES{,_FROM_CPLUSPLUS}
diff --git a/paludis/repositories/e/ebuild/ebuild.bash
b/paludis/repositories/e/ebuild/ebuild.bash
index f4387e1..24a93d4 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -74,7 +74,7 @@ ebuild_sanitise_envvars
# The list below should include all variables from all EAPIs, along with any
# fancy fake variables
-EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE SRC_URI DOWNLOADS
RESTRICT \
+EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE IUSE_EFFECTIVE SRC_URI
DOWNLOADS RESTRICT \
LICENSE LICENCES KEYWORDS INHERITED PROVIDE HOMEPAGE DESCRIPTION
DEPENDENCIES \
E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS DEFINED_PHASES \
MYOPTIONS E_MYOPTIONS E_DEPENDENCIES BINARY_KEYWORDS BINARY_URI \
@@ -82,7 +82,7 @@ EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE
SRC_URI DOWNLOADS RESTRIC
SUMMARY BUGS_TO UPSTREAM_DOCUMENTATION UPSTREAM_CHANGELOG \
UPSTREAM_RELEASE_NOTES PROPERTIES PALUDIS_DECLARED_FUNCTIONS SLOT EAPI
OPTIONS USE \
PALUDIS_EBUILD_RDEPEND_WAS_SET PALUDIS_EBUILD_DEPEND REQUIRED_USE
SCM_REVISION"
-EBUILD_METADATA_VARIABLES_FROM_CPLUSPLUS="SLOT EAPI OPTIONS USE"
+EBUILD_METADATA_VARIABLES_FROM_CPLUSPLUS="SLOT EAPI OPTIONS USE IUSE_EFFECTIVE"
shopt -s expand_aliases
[[ -z ${PALUDIS_SHELL_OPTIONS} && unset == ${PALUDIS_SHELL_OPTIONS-unset} ]] &&
--
cgit v0.10.2