From: Fabian Groffen Date: Mon, 1 Nov 2010 17:43:46 +0000 (+0100) Subject: install_qa_check_prefix: fix shebang check for symlink paths, bug #342929 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1ed6e993f33d428a08471a2213572d556187f2e8;p=portage.git install_qa_check_prefix: fix shebang check for symlink paths, bug #342929 --- diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 3840db6b5..08de747c5 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -807,8 +807,11 @@ install_qa_check_prefix() { rf=$(readlink ${fn}) [[ ${rf} != /* ]] && rf=${fn%/*}/${rf} fi + # need to have both absolutised paths, bug #342929 + line=$(canonicalize ${line[0]}) + local eprefix=$(canonicalize ${EPREFIX}) # does the shebang start with ${EPREFIX}, and does it exist? - if [[ ${line[0]} == ${EPREFIX}/* ]] ; then + if [[ ${line} == ${eprefix}/* ]] ; then if [[ ! -e ${ROOT%/}${line[0]} && ! -e ${D%/}${line[0]} ]] ; then # hmm, refers explicitly to $EPREFIX, but doesn't exist, # if it's in PATH that's wrong in any case