The code to check whether symlinked files point outside the prefix was
incorrect. It didn't include the install image location, hence it
always concluded a symlinked script was pointing to outside the prefix,
leading to bugs like #378515.
[[ ${rf} != /* ]] && rf=${fn%/*}/${rf}
# ignore symlinks pointing to outside prefix
# as seen in sys-devel/native-cctools
- [[ ${rf} != ${EPREFIX}/* && $(canonicalize "${rf}") != ${eprefix}/* ]] && continue
+ [[ $(canonicalize "/${rf#${D}}") != ${eprefix}/* ]] && continue
fi
# does the shebang start with ${EPREFIX}, and does it exist?
if [[ ${line[0]} == ${EPREFIX}/* || ${line[0]} == ${eprefix}/* ]] ; then