Revision: 2865
http://ipcop.svn.sourceforge.net/ipcop/?rev=2865&view=rev
Author: gespinasse
Date: 2009-05-16 16:34:35 +0000 (Sat, 16 May 2009)
Log Message:
-----------
I have being hit by /libreadline.so.5 issue in mkinitramfs until I understand
that bash has to be rebuild because of recent readline upgrade.
Trying to make dependencies clearer, I add the script that build the runtime
dependency list for each package.
Not yet plugged on our script.
A prelimary step is to have the real list of installed files.
Due to some symlink made in stage2, bash at least does not appear in bash
rootfile list
Modified Paths:
--------------
ipcop/trunk/config/rootfiles/common/misc-progs
Added Paths:
-----------
ipcop/trunk/src/scripts/build-rdepend
Modified: ipcop/trunk/config/rootfiles/common/misc-progs
===================================================================
--- ipcop/trunk/config/rootfiles/common/misc-progs 2009-05-16 11:37:58 UTC
(rev 2864)
+++ ipcop/trunk/config/rootfiles/common/misc-progs 2009-05-16 16:34:35 UTC
(rev 2865)
@@ -40,6 +40,7 @@
usr/local/bin/Make
usr/local/bin/accountingctrl
usr/local/bin/aggregatetraffic.pl
+#usr/local/bin/build-rdepend
usr/local/bin/cc
usr/local/bin/compile.help
usr/local/bin/configure
Added: ipcop/trunk/src/scripts/build-rdepend
===================================================================
--- ipcop/trunk/src/scripts/build-rdepend (rev 0)
+++ ipcop/trunk/src/scripts/build-rdepend 2009-05-16 16:34:35 UTC (rev
2865)
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# build the packages list that a package should depend to warrant it is
rebuild when parent is rebuild
+
+# TODO
+# - each package has it's own name in the dependency list, that name should be
removed
+# - rootfile list is wrong for some packages, worst is bash as bin/bash is not
in the list
+# as bin/bash symlink is added on stage2
+# - plug the resulting files in our build infrastructure, but I have no idea
yet how. Gilles
+
+RDEPEND_LIBS=/tmp/rdepend_libs # lib list needed to run a binary
include in a package
+RDEPEND_PACKAGES=/tmp/rdepend_packages # packages list that provide lib to
run a package
+rm -rf /tmp/rdep*
+
+MACHINE=`uname -m`
+case ${MACHINE} in
+ i?86)
+ MACHINE=i486
+ ;;
+ x86_64)
+ MACHINE=i486
+ ;;
+ alpha)
+ MACHINE=alpha
+ ;;
+ sparc|sparc64)
+ MACHINE=sparc
+ ;;
+ ppc|ppc64)
+ MACHINE=ppc
+ ;;
+esac
+
+mkdir -p ${RDEPEND_LIBS}
+mkdir -p ${RDEPEND_PACKAGES}
+
+# find on wich lib a program depend
+for logdir in $(ls -d /usr/src/log_${MACHINE}/0{2,3,4}*); do
+ for rootfile in $(ls ${logdir});do
+ for prog in $(cat $logdir/$rootfile | grep -v '^#'); do
+ #echo "prog is $prog"
+ if [ -f $prog ]; then
+ ldd $prog 2>/dev/null | awk '/=>/ { print $3 }' | grep /
>>${RDEPEND_LIBS}/${rootfile}
+ fi
+ done
+ done
+ echo "$logdir processed"
+done
+
+# have each lib name only once for each list
+for rootfile in $(ls ${RDEPEND_LIBS}/*);do
+ cat ${rootfile} | sort -u > ${rootfile}
+done
+
+# resolve on wich package a lib come from
+for rootfile in $(ls ${RDEPEND_LIBS});do
+ for lib in $(cat ${RDEPEND_LIBS}/$rootfile | sed 's|^/||'); do
+ # suppress the path as perl has MACHINE encoded there
+ baselib=$(basename $lib)
+ #echo "rootfile is $rootfile, lib is $baselib"
+ if [ -s ${RDEPEND_LIBS}/$rootfile ]; then
+ # only take first line and find correspond lfs package name
+ grep -l $baselib /usr/src/config/rootfiles/*/* | awk 'NR==1' |
xargs basename >> ${RDEPEND_PACKAGES}/${rootfile}
+ fi
+ done
+ # suppress package duplicate
+ if [ -s ${RDEPEND_LIBS}/$rootfile ]; then
+ cat ${RDEPEND_PACKAGES}/${rootfile} | sort -u >
${RDEPEND_PACKAGES}/${rootfile}
+ fi
+done
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn