From 215a65d667714c150d854ce9e3d3da37565e4e96 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 22 Feb 2010 19:56:18 +0000 Subject: [PATCH] follow symlinks before doing the executable check, makes stuff like python found (and shebang fixed) svn path=/main/branches/prefix/; revision=15435 --- bin/misc-functions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index b1ebe2aaa..2ff53f19e 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -628,7 +628,11 @@ install_qa_check_prefix() { # does the shebang start with ${EPREFIX}? [[ ${line[0]} == ${EPREFIX}* ]] && continue # can we just fix it(tm)? - if [[ -x ${EPREFIX}${line[0]} || -x ${ED}${line[0]} ]] ; then + local el=${EPREFIX}${line[0]} edl=${ED}${line[0]} + # follow symlinks, e.g. python is a symlink + [[ -L ${el} ]] && el=$(readlink "${el}") + [[ -L ${edl} ]] && edl=$(readlink "${edl}") + if [[ -x ${el} || -x ${edl} ]] ; then eqawarn "prefixing shebang of ${fn#${D}}" sed -i -e '1s:^#! \?:#!'"${EPREFIX}"':' "${fn}" continue -- 2.26.2