Index: qa.sh =================================================================== --- qa.sh (revision 383665) +++ qa.sh (working copy) @@ -136,21 +136,56 @@ } # For now do not raise an error, just warnings -stripped() { +elf() { [ -x /usr/bin/file ] || return # this is fatal [ -n "${STRIP}" ] || return 0 # Split file and result into 2 lines and read separately to ensure # files with spaces are kept intact. - find ${STAGEDIR} -type f \ - -exec /usr/bin/file --exclude ascii -nNF "${LF}" {} + | - while read f; do - read output + rc=0 + + while read f; do + read output case "${output}" in ELF\ *\ executable,\ *FreeBSD*,\ not\ stripped*|ELF\ *\ shared\ object,\ *FreeBSD*,\ not\ stripped*) warn "'${f#${STAGEDIR}${PREFIX}/}' is not stripped consider trying INSTALL_TARGET=install-strip or using \${STRIP_CMD}" ;; esac - done + case "${output}" in + ELF\ *\ executable,\ *FreeBSD*|ELF\ *\ shared\ object,\ *FreeBSD*) + while read link; do + case ${link} in + /lib/libncurses*) + err "'${f#${STAGEDIR}${PREFIX}/}' links to base ncurses please add USES=ncurses" + rc=1 + ;; + /lib/libreadline*) + err "'${f#${STAGEDIR}${PREFIX}/}' links to base libreadline please add USES=readline" + rc=1 + ;; + /usr/lib/libssl*|/lib/libcrypto*) + err "'${f#${STAGEDIR}${PREFIX}/}' links to base openssl please add USES=ssl" + rc=1 + ;; + /lib/libedit*) + err "'${f#${STAGEDIR}${PREFIX}/}' links to base libedit please add USES=nobase and use devel/libedit" + rc=1 + ;; + /usr/lib/libgssapi*) + err "'${f#${STAGEDIR}${PREFIX}/}' links to base libgssapi please add USES=gssapi" + rc=1 + ;; + esac + done <<-EOT + $(ldd -a -f '%p\n' $f) + EOT + ;; + esac + done <<-EOF + $(find ${STAGEDIR} -type f \ + -exec /usr/bin/file --exclude ascii -nNF "${LF}" {} +) + EOF + + return ${rc} } desktopfileutils() { @@ -255,7 +290,7 @@ fi } -checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl" +checks="shebang symlinks paths elf desktopfileutils sharedmimeinfo suidfiles libtool libperl" ret=0 cd ${STAGEDIR}