Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r15444 - main/branches/prefix/bin
Date: Tue, 23 Feb 2010 19:07:00
Message-Id: E1Nk05x-0001ni-Tb@stork.gentoo.org
1 Author: grobian
2 Date: 2010-02-23 19:06:57 +0000 (Tue, 23 Feb 2010)
3 New Revision: 15444
4
5 Modified:
6 main/branches/prefix/bin/misc-functions.sh
7 Log:
8 revert readlink attempt, needs to support both relative and absolute symlinks, just check if something exists
9
10 Modified: main/branches/prefix/bin/misc-functions.sh
11 ===================================================================
12 --- main/branches/prefix/bin/misc-functions.sh 2010-02-23 17:31:28 UTC (rev 15443)
13 +++ main/branches/prefix/bin/misc-functions.sh 2010-02-23 19:06:57 UTC (rev 15444)
14 @@ -628,11 +628,7 @@
15 # does the shebang start with ${EPREFIX}?
16 [[ ${line[0]} == ${EPREFIX}* ]] && continue
17 # can we just fix it(tm)?
18 - local el=${EPREFIX}${line[0]} edl=${ED}${line[0]}
19 - # follow symlinks, e.g. python is a symlink
20 - [[ -L ${el} ]] && el=$(readlink "${el}")
21 - [[ -L ${edl} ]] && edl=$(readlink "${edl}")
22 - if [[ -x ${el} || -x ${edl} ]] ; then
23 + if [[ -e ${EPREFIX}${line[0]} || -e ${ED}${line[0]} ]] ; then
24 eqawarn "prefixing shebang of ${fn#${D}}"
25 sed -i -e '1s:^#! \?:#!'"${EPREFIX}"':' "${fn}"
26 continue