Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: /
Date: Sun, 30 Sep 2012 11:22:42
Message-Id: 1349003995.be56a2b322aa6149ec6c0873c44121b5ae0a2933.grobian@gentoo
1 commit: be56a2b322aa6149ec6c0873c44121b5ae0a2933
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 30 11:19:55 2012 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 30 11:19:55 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=be56a2b3
7
8 Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
9
10 Conflicts:
11 bin/ebuild-helpers/dobin
12 bin/ebuild-helpers/dodir
13 bin/ebuild-helpers/dodoc
14 bin/ebuild-helpers/doexe
15 bin/ebuild-helpers/doinfo
16 bin/ebuild-helpers/dolib
17 bin/ebuild-helpers/doman
18 bin/ebuild-helpers/domo
19 bin/ebuild-helpers/dosbin
20 bin/ebuild-helpers/ecompressdir
21 bin/ebuild-helpers/fperms
22 bin/ebuild-helpers/prepall
23 bin/ebuild-helpers/prepallinfo
24 bin/ebuild-helpers/prepallman
25 bin/ebuild-helpers/prepallstrip
26 bin/ebuild-helpers/prepinfo
27 bin/ebuild-helpers/preplib
28 bin/ebuild-helpers/prepman
29 bin/ebuild.sh
30 bin/misc-functions.sh
31
32
33 bin/eapi.sh | 113 ++++++++++++++
34 bin/ebuild-helpers/dobin | 7 +-
35 bin/ebuild-helpers/dodir | 7 +-
36 bin/ebuild-helpers/dodoc | 23 ++--
37 bin/ebuild-helpers/doexe | 7 +-
38 bin/ebuild-helpers/dohard | 19 +--
39 bin/ebuild-helpers/doheader | 8 +-
40 bin/ebuild-helpers/doinfo | 7 +-
41 bin/ebuild-helpers/doins | 18 +--
42 bin/ebuild-helpers/dolib | 7 +-
43 bin/ebuild-helpers/doman | 7 +-
44 bin/ebuild-helpers/domo | 7 +-
45 bin/ebuild-helpers/dosbin | 7 +-
46 bin/ebuild-helpers/dosed | 19 +--
47 bin/ebuild-helpers/dosym | 5 +-
48 bin/ebuild-helpers/ecompressdir | 7 +-
49 bin/ebuild-helpers/fowners | 10 +-
50 bin/ebuild-helpers/fperms | 7 +-
51 bin/ebuild-helpers/newins | 17 +--
52 bin/ebuild-helpers/prepall | 7 +-
53 bin/ebuild-helpers/prepalldocs | 17 +--
54 bin/ebuild-helpers/prepallinfo | 7 +-
55 bin/ebuild-helpers/prepallman | 9 +-
56 bin/ebuild-helpers/prepallstrip | 9 +-
57 bin/ebuild-helpers/prepinfo | 9 +-
58 bin/ebuild-helpers/preplib | 7 +-
59 bin/ebuild-helpers/prepman | 9 +-
60 bin/ebuild-helpers/prepstrip | 5 +-
61 bin/ebuild-helpers/unprivileged/chgrp | 1 +
62 bin/ebuild-helpers/unprivileged/chown | 33 ++++
63 bin/ebuild.sh | 42 ++---
64 bin/isolated-functions.sh | 17 +-
65 bin/misc-functions.sh | 50 ++++---
66 bin/phase-functions.sh | 55 +++-----
67 bin/phase-helpers.sh | 155 +++++++++-----------
68 bin/save-ebuild-env.sh | 9 +-
69 pym/_emerge/BlockerCache.py | 4 +-
70 pym/portage/dbapi/vartree.py | 4 +-
71 pym/portage/dep/_slot_operator.py | 14 +-
72 pym/portage/getbinpkg.py | 4 +-
73 .../package/ebuild/_config/LocationsManager.py | 7 +-
74 pym/portage/package/ebuild/_config/UseManager.py | 20 ++-
75 pym/portage/package/ebuild/doebuild.py | 4 +
76 pym/portage/tests/ebuild/test_ipc_daemon.py | 4 +-
77 pym/portage/util/__init__.py | 16 ++-
78 45 files changed, 486 insertions(+), 334 deletions(-)
79
80 diff --cc bin/ebuild-helpers/dobin
81 index 3d81c2d,0ba1eb0..2d38580
82 --- a/bin/ebuild-helpers/dobin
83 +++ b/bin/ebuild-helpers/dobin
84 @@@ -1,8 -1,8 +1,8 @@@
85 -#!/bin/bash
86 +#!@PORTAGE_BASH@
87 - # Copyright 1999-2011 Gentoo Foundation
88 + # Copyright 1999-2012 Gentoo Foundation
89 # Distributed under the terms of the GNU General Public License v2
90
91 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
92 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
93
94 if [[ $# -lt 1 ]] ; then
95 __helpers_die "${0##*/}: at least one argument needed"
96 diff --cc bin/ebuild-helpers/dodir
97 index 3b9a171,e03ba9a..779bccc
98 --- a/bin/ebuild-helpers/dodir
99 +++ b/bin/ebuild-helpers/dodir
100 @@@ -1,11 -1,12 +1,12 @@@
101 -#!/bin/bash
102 +#!@PORTAGE_BASH@
103 - # Copyright 1999-2011 Gentoo Foundation
104 + # Copyright 1999-2012 Gentoo Foundation
105 # Distributed under the terms of the GNU General Public License v2
106
107 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
108 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
109
110 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
111 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
112 + if ! ___eapi_has_prefix_variables; then
113 + ED=${D}
114 + fi
115
116 install -d ${DIROPTIONS} "${@/#/${ED}/}"
117 ret=$?
118 diff --cc bin/ebuild-helpers/dodoc
119 index 7f5e364,c551735..4c1c7bc
120 --- a/bin/ebuild-helpers/dodoc
121 +++ b/bin/ebuild-helpers/dodoc
122 @@@ -2,19 -2,15 +2,15 @@@
123 # Copyright 1999-2012 Gentoo Foundation
124 # Distributed under the terms of the GNU General Public License v2
125
126 - case "${EAPI}" in
127 - 0|1|2|3)
128 - ;;
129 - *)
130 - exec \
131 - env \
132 - __PORTAGE_HELPER="dodoc" \
133 - doins "$@"
134 - ;;
135 - esac
136 -
137 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
138 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
139
140 + if ___eapi_dodoc_supports_-r; then
141 + exec \
142 + env \
143 + __PORTAGE_HELPER="dodoc" \
144 + doins "$@"
145 + fi
146 +
147 if [ $# -lt 1 ] ; then
148 __helpers_die "${0##*/}: at least one argument needed"
149 exit 1
150 diff --cc bin/ebuild-helpers/doexe
151 index 9c845ca,aa050e9..7ada92d
152 --- a/bin/ebuild-helpers/doexe
153 +++ b/bin/ebuild-helpers/doexe
154 @@@ -1,8 -1,8 +1,8 @@@
155 -#!/bin/bash
156 +#!@PORTAGE_BASH@
157 - # Copyright 1999-2011 Gentoo Foundation
158 + # Copyright 1999-2012 Gentoo Foundation
159 # Distributed under the terms of the GNU General Public License v2
160
161 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
162 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
163
164 if [[ $# -lt 1 ]] ; then
165 __helpers_die "${0##*/}: at least one argument needed"
166 diff --cc bin/ebuild-helpers/doinfo
167 index db49bed,355047f..816337f
168 --- a/bin/ebuild-helpers/doinfo
169 +++ b/bin/ebuild-helpers/doinfo
170 @@@ -1,8 -1,8 +1,8 @@@
171 -#!/bin/bash
172 +#!@PORTAGE_BASH@
173 - # Copyright 1999-2011 Gentoo Foundation
174 + # Copyright 1999-2012 Gentoo Foundation
175 # Distributed under the terms of the GNU General Public License v2
176
177 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
178 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
179
180 if [[ -z $1 ]] ; then
181 __helpers_die "${0##*/}: at least one argument needed"
182 diff --cc bin/ebuild-helpers/doins
183 index 343a150,4679e83..1fdc1d9
184 --- a/bin/ebuild-helpers/doins
185 +++ b/bin/ebuild-helpers/doins
186 @@@ -40,24 -41,12 +41,21 @@@ if [[ ${INSDESTTREE#${ED}} != "${INSDES
187 __helpers_die "${helper} used with \${D} or \${ED}"
188 exit 1
189 fi
190 +# PREFIX LOCAL: check for usage with EPREFIX
191 +if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
192 + vecho "-------------------------------------------------------" 1>&2
193 + vecho "You should not use \${EPREFIX} with helpers." 1>&2
194 + vecho " --> ${INSDESTTREE}" 1>&2
195 + vecho "-------------------------------------------------------" 1>&2
196 + exit 1
197 +fi
198 +# END PREFIX LOCAL
199
200 - case "$EAPI" in
201 - 0|1|2|3)
202 - PRESERVE_SYMLINKS=n
203 - ;;
204 - *)
205 - PRESERVE_SYMLINKS=y
206 - ;;
207 - esac
208 + if ___eapi_doins_and_newins_preserve_symlinks; then
209 + PRESERVE_SYMLINKS=y
210 + else
211 + PRESERVE_SYMLINKS=n
212 + fi
213
214 export TMP=$T/.doins_tmp
215 # Use separate directories to avoid potential name collisions.
216 diff --cc bin/ebuild-helpers/dolib
217 index 67055bb,fd92d7f..f161f72
218 --- a/bin/ebuild-helpers/dolib
219 +++ b/bin/ebuild-helpers/dolib
220 @@@ -1,11 -1,12 +1,12 @@@
221 -#!/bin/bash
222 +#!@PORTAGE_BASH@
223 - # Copyright 1999-2011 Gentoo Foundation
224 + # Copyright 1999-2012 Gentoo Foundation
225 # Distributed under the terms of the GNU General Public License v2
226
227 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
228 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
229
230 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
231 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
232 + if ! ___eapi_has_prefix_variables; then
233 + ED=${D}
234 + fi
235
236 # Setup ABI cruft
237 LIBDIR_VAR="LIBDIR_${ABI}"
238 diff --cc bin/ebuild-helpers/doman
239 index dd5440d,d680859..8273cae
240 --- a/bin/ebuild-helpers/doman
241 +++ b/bin/ebuild-helpers/doman
242 @@@ -1,8 -1,8 +1,8 @@@
243 -#!/bin/bash
244 +#!@PORTAGE_BASH@
245 - # Copyright 1999-2011 Gentoo Foundation
246 + # Copyright 1999-2012 Gentoo Foundation
247 # Distributed under the terms of the GNU General Public License v2
248
249 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
250 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
251
252 if [[ $# -lt 1 ]] ; then
253 __helpers_die "${0##*/}: at least one argument needed"
254 diff --cc bin/ebuild-helpers/domo
255 index 8246973,9a8dda3..bb9fca2
256 --- a/bin/ebuild-helpers/domo
257 +++ b/bin/ebuild-helpers/domo
258 @@@ -1,8 -1,8 +1,8 @@@
259 -#!/bin/bash
260 +#!@PORTAGE_BASH@
261 - # Copyright 1999-2011 Gentoo Foundation
262 + # Copyright 1999-2012 Gentoo Foundation
263 # Distributed under the terms of the GNU General Public License v2
264
265 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
266 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
267
268 mynum=${#}
269 if [ ${mynum} -lt 1 ] ; then
270 diff --cc bin/ebuild-helpers/dosbin
271 index 9765b75,361ca83..0ddd655
272 --- a/bin/ebuild-helpers/dosbin
273 +++ b/bin/ebuild-helpers/dosbin
274 @@@ -1,8 -1,8 +1,8 @@@
275 -#!/bin/bash
276 +#!@PORTAGE_BASH@
277 - # Copyright 1999-2011 Gentoo Foundation
278 + # Copyright 1999-2012 Gentoo Foundation
279 # Distributed under the terms of the GNU General Public License v2
280
281 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
282 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
283
284 if [[ $# -lt 1 ]] ; then
285 __helpers_die "${0##*/}: at least one argument needed"
286 diff --cc bin/ebuild-helpers/ecompressdir
287 index 464dd37,75f3e3a..83bf7fe
288 --- a/bin/ebuild-helpers/ecompressdir
289 +++ b/bin/ebuild-helpers/ecompressdir
290 @@@ -1,8 -1,8 +1,8 @@@
291 -#!/bin/bash
292 +#!@PORTAGE_BASH@
293 - # Copyright 1999-2011 Gentoo Foundation
294 + # Copyright 1999-2012 Gentoo Foundation
295 # Distributed under the terms of the GNU General Public License v2
296
297 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
298 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/helper-functions.sh
299
300 if [[ -z $1 ]] ; then
301 __helpers_die "${0##*/}: at least one argument needed"
302 diff --cc bin/ebuild-helpers/fowners
303 index 8066ab7,cee4108..0aef378
304 --- a/bin/ebuild-helpers/fowners
305 +++ b/bin/ebuild-helpers/fowners
306 @@@ -2,11 -2,11 +2,12 @@@
307 # Copyright 1999-2012 Gentoo Foundation
308 # Distributed under the terms of the GNU General Public License v2
309
310 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
311 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
312 +
313
314 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
315 - case "$EAPI" in 0|1|2) EPREFIX= ED=${D} ;; esac
316 + if ! ___eapi_has_prefix_variables; then
317 + EPREFIX= ED=${D}
318 + fi
319
320 # we can't prefix all arguments because
321 # chown takes random options
322 diff --cc bin/ebuild-helpers/fperms
323 index 0824c15,d854ebb..94f6af2
324 --- a/bin/ebuild-helpers/fperms
325 +++ b/bin/ebuild-helpers/fperms
326 @@@ -1,11 -1,12 +1,12 @@@
327 -#!/bin/bash
328 +#!@PORTAGE_BASH@
329 - # Copyright 1999-2011 Gentoo Foundation
330 + # Copyright 1999-2012 Gentoo Foundation
331 # Distributed under the terms of the GNU General Public License v2
332
333 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
334 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
335
336 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
337 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
338 + if ! ___eapi_has_prefix_variables; then
339 + ED=${D}
340 + fi
341
342 # we can't prefix all arguments because
343 # chmod takes random options
344 diff --cc bin/ebuild-helpers/prepall
345 index 3aacb7f,fb5c2db..407392f
346 --- a/bin/ebuild-helpers/prepall
347 +++ b/bin/ebuild-helpers/prepall
348 @@@ -1,13 -1,12 +1,14 @@@
349 -#!/bin/bash
350 +#!@PORTAGE_BASH@
351 - # Copyright 1999-2011 Gentoo Foundation
352 + # Copyright 1999-2012 Gentoo Foundation
353 # Distributed under the terms of the GNU General Public License v2
354
355 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
356 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
357 +
358 +[[ -d ${ED} ]] || exit 0
359
360 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
361 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
362 + if ! ___eapi_has_prefix_variables; then
363 + ED=${D}
364 + fi
365
366 if has chflags $FEATURES ; then
367 # Save all the file flags for restoration at the end of prepall.
368 diff --cc bin/ebuild-helpers/prepalldocs
369 index 2804987,3094661..c7c85d6
370 --- a/bin/ebuild-helpers/prepalldocs
371 +++ b/bin/ebuild-helpers/prepalldocs
372 @@@ -2,16 -2,12 +2,12 @@@
373 # Copyright 1999-2012 Gentoo Foundation
374 # Distributed under the terms of the GNU General Public License v2
375
376 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
377 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
378
379 - case "${EAPI}" in
380 - 0|1|2|3)
381 - ;;
382 - *)
383 - die "'${0##*/}' has been banned for EAPI '$EAPI'"
384 - exit 1
385 - ;;
386 - esac
387 + if ___eapi_has_docompress; then
388 + die "'${0##*/}' has been banned for EAPI '$EAPI'"
389 + exit 1
390 + fi
391
392 if [[ -n $1 ]] ; then
393 __vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
394 diff --cc bin/ebuild-helpers/prepallinfo
395 index 00e1fc4,1a20275..43d0980
396 --- a/bin/ebuild-helpers/prepallinfo
397 +++ b/bin/ebuild-helpers/prepallinfo
398 @@@ -1,11 -1,12 +1,12 @@@
399 -#!/bin/bash
400 +#!@PORTAGE_BASH@
401 - # Copyright 1999-2011 Gentoo Foundation
402 + # Copyright 1999-2012 Gentoo Foundation
403 # Distributed under the terms of the GNU General Public License v2
404
405 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
406 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
407
408 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
409 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
410 + if ! ___eapi_has_prefix_variables; then
411 + ED=${D}
412 + fi
413
414 [[ -d ${ED}usr/share/info ]] || exit 0
415
416 diff --cc bin/ebuild-helpers/prepallman
417 index fbc2f1d,7c78324..4ad3a5e
418 --- a/bin/ebuild-helpers/prepallman
419 +++ b/bin/ebuild-helpers/prepallman
420 @@@ -1,14 -1,15 +1,15 @@@
421 -#!/bin/bash
422 +#!@PORTAGE_BASH@
423 - # Copyright 1999-2011 Gentoo Foundation
424 + # Copyright 1999-2012 Gentoo Foundation
425 # Distributed under the terms of the GNU General Public License v2
426
427 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
428 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
429
430 # replaced by controllable compression in EAPI 4
431 - has "${EAPI}" 0 1 2 3 || exit 0
432 + ___eapi_has_docompress && exit 0
433
434 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
435 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
436 + if ! ___eapi_has_prefix_variables; then
437 + ED=${D}
438 + fi
439
440 ret=0
441
442 diff --cc bin/ebuild-helpers/prepallstrip
443 index f99a15b,1aa6686..d80f27a
444 --- a/bin/ebuild-helpers/prepallstrip
445 +++ b/bin/ebuild-helpers/prepallstrip
446 @@@ -1,8 -1,11 +1,11 @@@
447 -#!/bin/bash
448 +#!@PORTAGE_BASH@
449 - # Copyright 1999-2011 Gentoo Foundation
450 + # Copyright 1999-2012 Gentoo Foundation
451 # Distributed under the terms of the GNU General Public License v2
452
453 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
454 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
455 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
456 ++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
457 +
458 + if ! ___eapi_has_prefix_variables; then
459 + ED=${D}
460 + fi
461
462 exec prepstrip "${ED}"
463 diff --cc bin/ebuild-helpers/prepinfo
464 index 4ae4976,5afc18a..170e18a
465 --- a/bin/ebuild-helpers/prepinfo
466 +++ b/bin/ebuild-helpers/prepinfo
467 @@@ -1,11 -1,12 +1,12 @@@
468 -#!/bin/bash
469 +#!@PORTAGE_BASH@
470 - # Copyright 1999-2011 Gentoo Foundation
471 + # Copyright 1999-2012 Gentoo Foundation
472 # Distributed under the terms of the GNU General Public License v2
473
474 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
475 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
476
477 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
478 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
479 + if ! ___eapi_has_prefix_variables; then
480 + ED=${D}
481 + fi
482
483 if [[ -z $1 ]] ; then
484 infodir="/usr/share/info"
485 diff --cc bin/ebuild-helpers/preplib
486 index 8e3d4b3,764261d..145540c
487 --- a/bin/ebuild-helpers/preplib
488 +++ b/bin/ebuild-helpers/preplib
489 @@@ -1,8 -1,8 +1,8 @@@
490 -#!/bin/bash
491 +#!@PORTAGE_BASH@
492 - # Copyright 1999-2011 Gentoo Foundation
493 + # Copyright 1999-2012 Gentoo Foundation
494 # Distributed under the terms of the GNU General Public License v2
495
496 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
497 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
498
499 eqawarn "QA Notice: Deprecated call to 'preplib'"
500
501 diff --cc bin/ebuild-helpers/prepman
502 index 1411499,142d404..add01c8
503 --- a/bin/ebuild-helpers/prepman
504 +++ b/bin/ebuild-helpers/prepman
505 @@@ -1,11 -1,12 +1,12 @@@
506 -#!/bin/bash
507 +#!@PORTAGE_BASH@
508 - # Copyright 1999-2011 Gentoo Foundation
509 + # Copyright 1999-2012 Gentoo Foundation
510 # Distributed under the terms of the GNU General Public License v2
511
512 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
513 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
514
515 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
516 - case "$EAPI" in 0|1|2) ED=${D} ;; esac
517 + if ! ___eapi_has_prefix_variables; then
518 + ED=${D}
519 + fi
520
521 if [[ -z $1 ]] ; then
522 mandir="${ED}usr/share/man"
523 diff --cc bin/misc-functions.sh
524 index b66ded4,986264e..3b2c309
525 mode 100644,100755..100644
526 --- a/bin/misc-functions.sh
527 +++ b/bin/misc-functions.sh
528 @@@ -14,14 -14,12 +14,16 @@@
529 MISC_FUNCTIONS_ARGS="$@"
530 shift $#
531
532 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/ebuild.sh"
533 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}/ebuild.sh"
534
535 install_symlink_html_docs() {
536 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
537 - case "$EAPI" in 0|1|2) local ED=${D} ;; esac
538 - # PREFIX LOCAL: ED needs not to exist, whereas D does
539 - [[ ! -d ${ED} && -d ${D} ]] && dodir /
540 - # END PREFIX LOCAL
541 + if ! ___eapi_has_prefix_variables; then
542 + local ED=${D}
543 ++ else
544 ++ # PREFIX LOCAL: ED needs not to exist, whereas D does
545 ++ [[ ! -d ${ED} && -d ${D} ]] && dodir /
546 ++ # END PREFIX LOCAL
547 + fi
548 cd "${ED}" || die "cd failed"
549 #symlink the html documentation (if DOC_SYMLINKS_DIR is set in make.conf)
550 if [ -n "${DOC_SYMLINKS_DIR}" ] ; then
551 @@@ -165,12 -164,11 +168,13 @@@ prepcompress()
552
553 install_qa_check() {
554 local f i qa_var x
555 - [[ " ${FEATURES} " == *" force-prefix "* ]] || \
556 - case "$EAPI" in 0|1|2) local EPREFIX= ED=${D} ;; esac
557 + if ! ___eapi_has_prefix_variables; then
558 + local EPREFIX= ED=${D}
559 + fi
560
561 - cd "${ED}" || die "cd failed"
562 + # PREFIX LOCAL: ED needs not to exist, whereas D does
563 + cd "${D}" || die "cd failed"
564 + # END PREFIX LOCAL
565
566 qa_var="QA_FLAGS_IGNORED_${ARCH/-/_}"
567 eval "[[ -n \${!qa_var} ]] && QA_FLAGS_IGNORED=(\"\${${qa_var}[@]}\")"
568 diff --cc pym/portage/package/ebuild/doebuild.py
569 index 84e4494,9deed98..2db7900
570 --- a/pym/portage/package/ebuild/doebuild.py
571 +++ b/pym/portage/package/ebuild/doebuild.py
572 @@@ -152,11 -150,18 +152,15 @@@ def _doebuild_path(settings, eapi=None)
573 eprefix = settings["EPREFIX"]
574 prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x]
575 rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x]
576 -
577 - prefixes = []
578 - if eprefix:
579 - prefixes.append(eprefix)
580 - prefixes.append("/")
581 -
582 + # PREFIX LOCAL: use DEFAULT_PATH and EXTRA_PATH from make.globals
583 + defaultpath = [x for x in settings.get("DEFAULT_PATH", "").split(":") if x]
584 + extrapath = [x for x in settings.get("EXTRA_PATH", "").split(":") if x]
585 path = []
586
587 + if eprefix and uid != 0 and "fakeroot" not in settings.features:
588 + path.append(os.path.join(portage_bin_path,
589 + "ebuild-helpers", "unprivileged"))
590 +
591 if settings.get("USERLAND", "GNU") != "GNU":
592 path.append(os.path.join(portage_bin_path, "ebuild-helpers", "bsd"))