Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:repoman commit in: bin/ebuild-helpers/
Date: Tue, 27 Jun 2017 20:06:09
Message-Id: 1492720791.18712aa6924862bbab5814c6199e7d7ab416d005.dolsen@gentoo
1 commit: 18712aa6924862bbab5814c6199e7d7ab416d005
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 19 13:36:02 2017 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 20 20:39:51 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=18712aa6
7
8 dosym: protect Prefix hack from double EPREFIX
9
10 Add an additional conditional to the dosym Prefix hack to ensure that
11 the symlink is not using double Prefix when the ebuild uses ${EPREFIX}
12 explicitly. This ensures that Portage on Prefix systems is both
13 compatible with the ebuilds relying on the hack, and using dosym
14 in the PMS-defined manner.
15
16 Approved-by: Brian Dolbec <dolsen <AT> gentoo.org> (on IRC)
17 Approved-by: Ulrich Müller <ulm <AT> gentoo.org>
18
19 bin/ebuild-helpers/dosym | 10 ++++++++--
20 1 file changed, 8 insertions(+), 2 deletions(-)
21
22 diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
23 index b9c70ce9c..e96039146 100755
24 --- a/bin/ebuild-helpers/dosym
25 +++ b/bin/ebuild-helpers/dosym
26 @@ -20,9 +20,15 @@ fi
27
28 destdir=${2%/*}
29 [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
30 -# when absolute, prefix with offset for Gentoo Prefix
31 target="${1}"
32 -[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
33 +# DEPRECATED HACK: when absolute, prefix with offset for Gentoo Prefix
34 +# (but only if ${EPREFIX} is not there already)
35 +# this will eventually be removed, #615594
36 +if [[ ${target:0:1} == "/" && ${target}/ != "${EPREFIX}"/* ]]; then
37 + eqawarn "dosym: prepending EPREFIX to path implicitly. If this is desired,"
38 + eqawarn " please fix the ebuild to use \${EPREFIX} explicitly."
39 + target="${EPREFIX}${target}"
40 +fi
41 ln -snf "${target}" "${ED}${2}"
42
43 ret=$?