as NEEDED files don't conain enough formation for e.g. preserve-libsto work properly...
authorMarius Mauch <genone@gentoo.org>
Fri, 25 Apr 2008 03:39:58 +0000 (03:39 -0000)
committerMarius Mauch <genone@gentoo.org>
Fri, 25 Apr 2008 03:39:58 +0000 (03:39 -0000)
svn path=/main/trunk/; revision=9970

bin/misc-functions.sh
pym/portage/dbapi/vartree.py

index 41b38e5a5c51f17df4229f08fb2dadf7a657a46e..c5952926a3ac2de14979b20a1f2bd197e2ab634d 100755 (executable)
@@ -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 }
 
index d2ff6c1ef139de172511c9cecba6621970ae2423..d9048dcabbaa58eca5e9190443605e650b8e2921 100644 (file)
@@ -2055,6 +2055,7 @@ class dblink(object):
 
                # copy "info" files (like SLOT, CFLAGS, etc.) into the database
                for x in listdir(inforoot):
+                       print x
                        self.copyfile(inforoot+"/"+x)
 
                # write local package counter for recording