From fe826380797ea035ac2778fa03149ac7b5e89b18 Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Fri, 25 Apr 2008 03:39:58 +0000 Subject: as NEEDED files don't conain enough formation for e.g. preserve-libsto work properly and we don't want to change the format of existing files create another file including additional information svn path=/main/trunk/; revision=9970 --- bin/misc-functions.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 41b38e5a5..c5952926a 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -159,13 +159,16 @@ install_qa_check() { fi # Save NEEDED information after removing self-contained providers - scanelf -qyRF '%p:%r %n' "${D}" | sed -e 's:^:/:' | { while read l; do - obj=${l%%:*} - rpath=${l##*:}; rpath=${rpath%% *} - needed=${l##* } + scanelf -qyRF '%a;%p;%S;%r;%n' "${D}" | { while read l; do + arch=${l%%;*}; l=${l#*;} + obj="/${l%%;*}"; l=${l#*;} + soname=${l%%;*}; l=${l#*;} + rpath=${l%%;*}; l=${l#*;}; [ "${rpath}" == " - " ] && rpath="" + needed=${l%%;*}; l=${l#*;} if [ -z "${rpath}" -o -n "${rpath//*ORIGIN*}" ]; then # object doesn't contain $ORIGIN in its runpath attribute echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED + echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.2 else dir=$(dirname ${obj}) # replace $ORIGIN with the dirname of the current object for the lookup @@ -176,7 +179,10 @@ install_qa_check() { [ -e "${D}/${dir}/${lib}" ] || rneeded="${rneeded},${lib}" done rneeded=${rneeded:1} - [ -n "${rneeded}" ] && echo "${obj} ${rneeded}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED + if [ -n "${rneeded}" ]; then + echo "${obj} ${rneeded}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED + echo "${arch:3};/${obj};${soname};${rpath};${rneeded}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.2 + fi fi done } -- cgit v1.2.3-1-g7c22