? ebuild.sh-multilib-pkg Index: ebuild.sh =================================================================== RCS file: /var/cvsroot/gentoo-src/portage/bin/ebuild.sh,v retrieving revision 1.201.2.24 diff -p -u -4 -r1.201.2.24 ebuild.sh --- ebuild.sh 26 Feb 2005 11:22:37 -0000 1.201.2.24 +++ ebuild.sh 5 Apr 2005 22:21:35 -0000 @@ -1034,26 +1034,49 @@ dyn_install() { UNSAFE=$(($UNSAFE + 1)) echo "UNSAFE SetUID: $i" done - if [ -x /usr/bin/readelf -a -x /usr/bin/file ]; then - for x in $(find "${D}/" -type f \( -perm -04000 -o -perm -02000 \) ); do - f=$(file "${x}") - if [ -z "${f/*SB executable*/}" -o -z "${f/*SB shared object*/}" ]; then - /usr/bin/readelf -d "${x}" | egrep '\(FLAGS(.*)NOW' > /dev/null - if [ $? != 0 ]; then - if [ ! -z "${f/*statically linked*/}" ]; then - #uncomment this line out after developers have had ample time to fix pkgs. - #UNSAFE=$(($UNSAFE + 1)) - echo -ne '\a' - echo "QA Notice: ${x:${#D}:${#x}} is setXid, dynamically linked and using lazy bindings." - echo "This combination is generally discouraged. Try: CFLAGS='-Wl,-z,now' emerge ${PN}" - echo -ne '\a' - sleep 1 + if [[ -x /usr/bin/readelf ]] ; then + if [[ -x /usr/bin/file ]] ; then + for x in $(find "${D}/" -type f \( -perm -04000 -o -perm -02000 \) ); do + f=$(file "${x}") + if [[ -z "${f/*SB executable*/}" || -z "${f/*SB shared object*/}" ]]; then + if ! /usr/bin/readelf -d "${x}" | egrep '\(FLAGS(.*)NOW' > /dev/null ; then + if [[ ! -z "${f/*statically linked*/}" ]] ; then + #uncomment this line out after developers have had ample time to fix pkgs. + #UNSAFE=$(($UNSAFE + 1)) + echo -ne '\a' + echo "QA Notice: ${x:${#D}:${#x}} is setXid, dynamically linked and using lazy bindings." + echo "This combination is generally discouraged. Try: CFLAGS='-Wl,-z,now' emerge ${PN}" + echo -ne '\a' + sleep 1 + fi fi fi - fi - done + done + fi + + if hasq bindeps ${FEATURES} ; then + > ${BUILDDIR}/build-info/soname.DEPEND + > ${BUILDDIR}/build-info/soname.PROVIDE + for file in $(find "${D}/" -type f) ; do + local f=$(file ${file}) + + if [[ -z "${f/*SB executable*/}" || -z "${f/*SB shared object*/}" ]]; then + local soname=$(readelf -d ${file} | grep SONAME | sed 's/^.*\[\(.*\)\].*$/\1/') + local depend=$(readelf -d ${file} | grep NEEDED | sed 's/^.*\[\(.*\)\].*$/\1/') + + if [[ -n ${soname} ]] ; then + echo "${soname} ${file/${D}/}" >> ${BUILDDIR}/build-info/soname.PROVIDE + fi + + local dep= + for dep in ${depend} ; do + echo "${dep} ${file/${D}/}" >> ${BUILDDIR}/build-info/soname.DEPEND + done + fi + done + fi fi if [[ $UNSAFE > 0 ]]; then die "There are ${UNSAFE} unsafe files. Portage will not install them."