On Sat, 2002-04-13 at 12:36, Jeff Newmiller wrote: > perhaps > > #!/bin/sh > TMPDIR=/tmp/lrpdd > ORIGDIR=`pwd` > > if [ "" == "$1" ]; then > echo "usage : lrpldd lrpfilename" > elif [ -r "$1" ]; then > mkdir $TMPDIR > cd $TMPDIR > tar xzf $1 > find . -type f -exec ldd \{} \; 2>/dev/null \ > | grep -v ':$' | sort | uniq > cd $ORIGDIR > rm -R $TMPDIR > else > echo "lrpldd : \"$1\" not found" > fi > > would be more effective?
Jeff & Lynn, Thanks for the help. :-) Jeff, I modified your script, and added Lynn's awk line. I hope I didn't muck it up to bad. #! /bin/bash TMPDIR=temp ORIGDIR=`pwd` if [ "" == "$1" ]; then echo "usage : ./ldd-ver.sh lrpfilename" elif [ -r "$1" ]; then mkdir $TMPDIR cp "$1" $TMPDIR cd $TMPDIR tar xzf `basename $1` find . -type f -exec ldd \{} \; 2>/dev/null \ | grep -v ':$' | sort | uniq awk '{print $1}' var/lib/lrpkg/`basename $1 .lrp`.version cd $ORIGDIR rm -rf $TMPDIR else echo "lrpldd : \"$1\" not found" fi Everyone, Is there a reason that our packages don't contain the program name in the version file? I've been looking at the ldd output, and I'm having a hard time figuring out how to determine glibc versions from its output. The best I've come up with is to look for the presence of libm.so.6. Is that correct? Example of glibc 2.0 output: $ ./ldd-ver.sh packages/snort.lrp libc.so.6 => /lib/libc.so.6 (0x40041000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40017000) libnsl.so.1 => /lib/libnsl.so.1 (0x4002a000) not a dynamic executable 1.5-1 Example of glibc 2.1 output: $ ./ldd-ver.sh packages/squid-2.lrp libcrypt.so.1 => /lib/libcrypt.so.1 (0x40028000) libc.so.6 => /lib/libc.so.6 (0x40028000) libc.so.6 => /lib/libc.so.6 (0x40053000) libc.so.6 => /lib/libc.so.6 (0x40073000) libc.so.6 => /lib/libc.so.6 (0x400a0000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40017000) libm.so.6 => /lib/libm.so.6 (0x40028000) libm.so.6 => /lib/libm.so.6 (0x40055000) libnsl.so.1 => /lib/libnsl.so.1 (0x4003c000) libnsl.so.1 => /lib/libnsl.so.1 (0x4005c000) libnsl.so.1 => /lib/libnsl.so.1 (0x40089000) libresolv.so.2 => /lib/libresolv.so.2 (0x4002a000) libresolv.so.2 => /lib/libresolv.so.2 (0x4004a000) libresolv.so.2 => /lib/libresolv.so.2 (0x40077000) not a dynamic executable 2.4.STABLE4 -- Mike Noyes <[EMAIL PROTECTED]> http://sourceforge.net/users/mhnoyes/ http://leaf-project.org/ _______________________________________________ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel