Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/paludis/files: 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
Date: Sun, 29 Mar 2015 18:30:56
Message-Id: 20150329183052.D0E7714CAE@oystercatcher.gentoo.org
1 mgorny 15/03/29 18:30:52
2
3 Added: paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch
4 paludis-2.2.0-fix-MERGE_TYPE.patch
5 paludis-2.2.0-fix-PWD-handling.patch
6 paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch
7 paludis-2.2.0-filter-IUSE_EFFECTIVE.patch
8 Log:
9 Backport some EAPI support bugfixes.
10
11 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
12
13 Revision Changes Path
14 1.1 sys-apps/paludis/files/paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch
15
16 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
17 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
18
19 Index: paludis-2.2.0-check-IUSE_EFFECTIVE-in-EAPI-5.patch
20 ===================================================================
21 From bfb1bd7682b4a678cfa7dccb87d1f49d842317ac Mon Sep 17 00:00:00 2001
22 From: David Leverton <levertond@××××××××××.com>
23 Date: Sat, 21 Mar 2015 20:04:30 +0000
24 Subject: Only check IUSE_EFFECTIVE for EAPI 5
25
26 In other EAPIs the value isn't set by C++, and therefore may leak in
27 from the calling environment.
28
29 diff --git a/paludis/repositories/e/ebuild/0/list_functions.bash b/paludis/repositories/e/ebuild/0/list_functions.bash
30 index 0c5d91a..4998c2b 100644
31 --- a/paludis/repositories/e/ebuild/0/list_functions.bash
32 +++ b/paludis/repositories/e/ebuild/0/list_functions.bash
33 @@ -37,13 +37,6 @@ usev()
34
35 useq()
36 {
37 - if [[ -n "${IUSE_EFFECTIVE:+x}" ]] ; then
38 - local i=( $IUSE_EFFECTIVE )
39 - if ! hasq ${1#!} "${i[@]#[+-]}" ; then
40 - die "Flag '${1#!}' is not included in IUSE_EFFECTIVE=\"${IUSE_EFFECTIVE}\""
41 - fi
42 - fi
43 -
44 if [[ "${1:0:1}" == "!" ]] ; then
45 ! hasq "${1#!}" "${USE}"
46 else
47 diff --git a/paludis/repositories/e/ebuild/5/Makefile.am b/paludis/repositories/e/ebuild/5/Makefile.am
48 index fbcb919..ced4e53 100644
49 --- a/paludis/repositories/e/ebuild/5/Makefile.am
50 +++ b/paludis/repositories/e/ebuild/5/Makefile.am
51 @@ -7,6 +7,7 @@ libexecprog5dir = $(libexecdir)/paludis/5
52 libexecprog5_SCRIPTS = \
53 src_test.bash \
54 usex.bash \
55 + list_functions.bash \
56 output_functions.bash
57
58 TESTS =
59 diff --git a/paludis/repositories/e/ebuild/5/list_functions.bash b/paludis/repositories/e/ebuild/5/list_functions.bash
60 new file mode 100644
61 index 0000000..7cb22ad
62 --- /dev/null
63 +++ b/paludis/repositories/e/ebuild/5/list_functions.bash
64 @@ -0,0 +1,41 @@
65 +#!/usr/bin/env bash
66 +# vim: set sw=4 sts=4 et :
67 +
68 +# Copyright (c) 2006, 2009, 2012 Ciaran McCreesh
69 +# Copyright (c) 2015 David Leverton
70 +#
71 +# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
72 +# Gentoo Foundation and distributed under the terms of the GNU General
73 +# Public License v2.
74 +#
75 +# This file is part of the Paludis package manager. Paludis is free software;
76 +# you can redistribute it and/or modify it under the terms of the GNU General
77 +# Public License, version 2, as published by the Free Software Foundation.
78 +#
79 +# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
80 +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
81 +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
82 +# details.
83 +#
84 +# You should have received a copy of the GNU General Public License along with
85 +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
86 +# Place, Suite 330, Boston, MA 02111-1307 USA
87 +
88 +ebuild_load_module --older list_functions
89 +
90 +useq()
91 +{
92 + if [[ -n "${IUSE_EFFECTIVE:+x}" ]] ; then
93 + local i=( $IUSE_EFFECTIVE )
94 + if ! hasq ${1#!} "${i[@]#[+-]}" ; then
95 + die "Flag '${1#!}' is not included in IUSE_EFFECTIVE=\"${IUSE_EFFECTIVE}\""
96 + fi
97 + fi
98 +
99 + if [[ "${1:0:1}" == "!" ]] ; then
100 + ! hasq "${1#!}" "${USE}"
101 + else
102 + hasq "${1}" "${USE}"
103 + fi
104 +}
105 +
106 --
107 cgit v0.10.2
108
109
110
111
112 1.1 sys-apps/paludis/files/paludis-2.2.0-fix-MERGE_TYPE.patch
113
114 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
115 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
116
117 Index: paludis-2.2.0-fix-MERGE_TYPE.patch
118 ===================================================================
119 From 96768e54e2fdfc526edd2e939f20203e43b25a36 Mon Sep 17 00:00:00 2001
120 From: David Leverton <levertond@××××××××××.com>
121 Date: Sun, 1 Mar 2015 15:22:32 +0000
122 Subject: Fix MERGE_TYPE
123
124 Unfortunately the test cases were broken in the same way as the
125 feature itself, so it wasn't caught.
126
127 Fixes: ticket:1323
128
129 diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
130 index a59014d..caccf2c 100644
131 --- a/paludis/repositories/e/e_repository_TEST_4.cc
132 +++ b/paludis/repositories/e/e_repository_TEST_4.cc
133 @@ -301,7 +301,6 @@ TEST(ERepository, EAPI4MergeType)
134 n::replacing() = std::make_shared<PackageIDSequence>(),
135 n::want_phase() = &want_all_phases
136 ));
137 - ::setenv("EXPECTED_MERGE_TYPE", "source", 1);
138
139 const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
140 PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-4::test-repo",
141 @@ -371,7 +370,6 @@ TEST(ERepository, EAPI4MergeTypeBin)
142 n::replacing() = std::make_shared<PackageIDSequence>(),
143 n::want_phase() = &want_all_phases
144 ));
145 - ::setenv("EXPECTED_MERGE_TYPE", "buildonly", 1);
146
147 const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
148 PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::test-repo",
149 @@ -389,7 +387,6 @@ TEST(ERepository, EAPI4MergeTypeBin)
150 n::replacing() = std::make_shared<PackageIDSequence>(),
151 n::want_phase() = &want_all_phases
152 ));
153 - ::setenv("EXPECTED_MERGE_TYPE", "binary", 1);
154
155 const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
156 PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::binrepo",
157 diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh
158 index 81b6593..0c28acc 100755
159 --- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
160 +++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
161 @@ -956,6 +956,8 @@ KEYWORDS="test"
162
163 S="${WORKDIR}"
164
165 +EXPECTED_MERGE_TYPE=source
166 +
167 pkg_setup() {
168 if [[ ${EXPECTED_MERGE_TYPE} != ${MERGE_TYPE} ]] ; then
169 die ${EXPECTED_MERGE_TYPE} is not ${MERGE_TYPE}
170 @@ -975,10 +977,13 @@ KEYWORDS="test"
171
172 S="${WORKDIR}"
173
174 +EXPECTED_MERGE_TYPE=buildonly
175 +
176 pkg_setup() {
177 if [[ ${EXPECTED_MERGE_TYPE} != ${MERGE_TYPE} ]] ; then
178 die ${EXPECTED_MERGE_TYPE} is not ${MERGE_TYPE}
179 fi
180 + EXPECTED_MERGE_TYPE=binary
181 }
182 END
183 mkdir -p "cat/required-use-all-good" || exit 1
184 diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
185 index a88554b..f4387e1 100755
186 --- a/paludis/repositories/e/ebuild/ebuild.bash
187 +++ b/paludis/repositories/e/ebuild/ebuild.bash
188 @@ -304,7 +304,7 @@ ebuild_scrub_environment()
189 echo "\${!${PALUDIS_CLIENT_UPPER}_CMDLINE_*} ${PALUDIS_CLIENT_UPPER}_OPTIONS" )
190
191 unset -v CATEGORY PN PV P PNV PVR PF PNVR
192 - unset -v ebuild EBUILD
193 + unset -v ebuild EBUILD MERGE_TYPE
194 unset -v $(
195 for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
196 echo E_${v}
197 --
198 cgit v0.10.2
199
200
201
202
203 1.1 sys-apps/paludis/files/paludis-2.2.0-fix-PWD-handling.patch
204
205 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
206 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
207
208 Index: paludis-2.2.0-fix-PWD-handling.patch
209 ===================================================================
210 From f9b2434560399b00f7de479474f8f22fc0271e77 Mon Sep 17 00:00:00 2001
211 From: Georgi Georgiev <chutz@×××.net>
212 Date: Tue, 10 Mar 2015 00:38:36 +0900
213 Subject: PWD is a special variable, we should leave its value alone
214
215 Bash sets the value of PWD to the current working directory. It is not a
216 good idea to change that variable without actually changing the
217 directory. This would happen if the working directory changes between
218 saving and loading the environment (saving - when building a PBIN, and
219 loading - when installing it for example), so better let bash handle
220 this variable.
221
222 Fixes: ticket:1325
223
224 diff --git a/paludis/repositories/e/ebuild/source_functions.bash b/paludis/repositories/e/ebuild/source_functions.bash
225 index 58b9327..5bfb251 100755
226 --- a/paludis/repositories/e/ebuild/source_functions.bash
227 +++ b/paludis/repositories/e/ebuild/source_functions.bash
228 @@ -37,7 +37,7 @@ ebuild_need_extglob()
229 ebuild_safe_source()
230 {
231 set -- "${@}" '[^a-zA-Z_]*' '*[^a-zA-Z0-9_]*' \
232 - EUID PPID UID FUNCNAME GROUPS SHELLOPTS BASHOPTS BASHPID IFS \
233 + EUID PPID UID FUNCNAME GROUPS SHELLOPTS BASHOPTS BASHPID IFS PWD \
234 'BASH_@(ARGC|ARGV|LINENO|SOURCE|VERSINFO|REMATCH)' \
235 'BASH_COMPLETION?(_DIR)' 'bash+([0-9])?([a-z])' \
236 EBUILD_KILL_PID PALUDIS_LOADSAVEENV_DIR PALUDIS_DO_NOTHING_SANDBOXY SANDBOX_ACTIVE \
237 --
238 cgit v0.10.2
239
240
241
242
243 1.1 sys-apps/paludis/files/paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch
244
245 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
246 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
247
248 Index: paludis-2.2.0-filter-EBUILD_PHASE_FUNC.patch
249 ===================================================================
250 From dccb65acba7684c97675473fec5120e3aa55d2d0 Mon Sep 17 00:00:00 2001
251 From: David Leverton <levertond@××××××××××.com>
252 Date: Sun, 29 Mar 2015 18:36:02 +0100
253 Subject: Fix EBUILD_PHASE_FUNC leakage
254
255
256 diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
257 index 24a93d4..b856bad 100755
258 --- a/paludis/repositories/e/ebuild/ebuild.bash
259 +++ b/paludis/repositories/e/ebuild/ebuild.bash
260 @@ -76,7 +76,7 @@ ebuild_sanitise_envvars
261 # fancy fake variables
262 EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE IUSE_EFFECTIVE SRC_URI DOWNLOADS RESTRICT \
263 LICENSE LICENCES KEYWORDS INHERITED PROVIDE HOMEPAGE DESCRIPTION DEPENDENCIES \
264 - E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS DEFINED_PHASES \
265 + E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS DEFINED_PHASES EBUILD_PHASE_FUNC \
266 MYOPTIONS E_MYOPTIONS E_DEPENDENCIES BINARY_KEYWORDS BINARY_URI \
267 GENERATED_USING GENERATED_TIME GENERATED_FROM_REPOSITORY BINARY_PLATFORMS REMOTE_IDS \
268 SUMMARY BUGS_TO UPSTREAM_DOCUMENTATION UPSTREAM_CHANGELOG \
269 --
270 cgit v0.10.2
271
272
273
274
275 1.1 sys-apps/paludis/files/paludis-2.2.0-filter-IUSE_EFFECTIVE.patch
276
277 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
278 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
279
280 Index: paludis-2.2.0-filter-IUSE_EFFECTIVE.patch
281 ===================================================================
282 From ef6930e03428ec512c9d564886c06078e5238d45 Mon Sep 17 00:00:00 2001
283 From: David Leverton <levertond@××××××××××.com>
284 Date: Sat, 21 Mar 2015 19:38:52 +0000
285 Subject: Add IUSE_EFFECTIVE to EBUILD_METADATA_VARIABLES{,_FROM_CPLUSPLUS}
286
287
288 diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
289 index f4387e1..24a93d4 100755
290 --- a/paludis/repositories/e/ebuild/ebuild.bash
291 +++ b/paludis/repositories/e/ebuild/ebuild.bash
292 @@ -74,7 +74,7 @@ ebuild_sanitise_envvars
293
294 # The list below should include all variables from all EAPIs, along with any
295 # fancy fake variables
296 -EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE SRC_URI DOWNLOADS RESTRICT \
297 +EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE IUSE_EFFECTIVE SRC_URI DOWNLOADS RESTRICT \
298 LICENSE LICENCES KEYWORDS INHERITED PROVIDE HOMEPAGE DESCRIPTION DEPENDENCIES \
299 E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS DEFINED_PHASES \
300 MYOPTIONS E_MYOPTIONS E_DEPENDENCIES BINARY_KEYWORDS BINARY_URI \
301 @@ -82,7 +82,7 @@ EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE SRC_URI DOWNLOADS RESTRIC
302 SUMMARY BUGS_TO UPSTREAM_DOCUMENTATION UPSTREAM_CHANGELOG \
303 UPSTREAM_RELEASE_NOTES PROPERTIES PALUDIS_DECLARED_FUNCTIONS SLOT EAPI OPTIONS USE \
304 PALUDIS_EBUILD_RDEPEND_WAS_SET PALUDIS_EBUILD_DEPEND REQUIRED_USE SCM_REVISION"
305 -EBUILD_METADATA_VARIABLES_FROM_CPLUSPLUS="SLOT EAPI OPTIONS USE"
306 +EBUILD_METADATA_VARIABLES_FROM_CPLUSPLUS="SLOT EAPI OPTIONS USE IUSE_EFFECTIVE"
307
308 shopt -s expand_aliases
309 [[ -z ${PALUDIS_SHELL_OPTIONS} && unset == ${PALUDIS_SHELL_OPTIONS-unset} ]] &&
310 --
311 cgit v0.10.2