Gentoo Archives: gentoo-commits

From: "Marius Mauch (genone)" <genone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9275 - main/trunk/bin
Date: Tue, 05 Feb 2008 18:57:12
Message-Id: E1JMSyj-0008B4-N1@stork.gentoo.org
1 Author: genone
2 Date: 2008-02-05 18:57:08 +0000 (Tue, 05 Feb 2008)
3 New Revision: 9275
4
5 Modified:
6 main/trunk/bin/misc-functions.sh
7 Log:
8 don't record internal providers in NEEDED records as they are pointless for all useful applications in portage and complicate them instead (e.g. bug #205531)
9
10 Modified: main/trunk/bin/misc-functions.sh
11 ===================================================================
12 --- main/trunk/bin/misc-functions.sh 2008-02-05 18:01:06 UTC (rev 9274)
13 +++ main/trunk/bin/misc-functions.sh 2008-02-05 18:57:08 UTC (rev 9275)
14 @@ -158,8 +158,27 @@
15 sleep 1
16 fi
17
18 - # Save NEEDED information
19 - scanelf -qyRF '%p %n' "${D}" | sed -e 's:^:/:' > "${PORTAGE_BUILDDIR}"/build-info/NEEDED
20 + # Save NEEDED information after removing self-contained providers
21 + scanelf -qyRF '%p:%r %n' "${D}" | sed -e 's:^:/:' | { while read l; do
22 + obj=${l%%:*}
23 + rpath=${l##*:}; rpath=${rpath%% *}
24 + needed=${l##* }
25 + if [ -z "${rpath}" -o -n "${rpath//*ORIGIN*}" ]; then
26 + # object doesn't contain $ORIGIN in its runpath attribute
27 + echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
28 + else
29 + dir=$(dirname ${obj})
30 + # replace $ORIGIN with the dirname of the current object for the lookup
31 + opath=$(echo :${rpath}: | sed -e "s#.*:\(.*\)\$ORIGIN\(.*\):.*#\1${dir}\2#")
32 + sneeded=$(echo ${needed} | tr , ' ')
33 + rneeded=""
34 + for lib in ${sneeded}; do
35 + [ -e "${D}/${dir}/${lib}" ] || rneeded="${rneeded},${lib}"
36 + done
37 + rneeded=${rneeded:1}
38 + [ -n "${rneeded}" ] && echo "${obj} ${rneeded}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
39 + fi
40 + done }
41
42 if [[ ${insecure_rpath} -eq 1 ]] ; then
43 die "Aborting due to serious QA concerns with RUNPATH/RPATH"
44
45 --
46 gentoo-commits@l.g.o mailing list