[OT] Fun with walking package licenses
Mike McCarty
mike.mccarty at sbcglobal.net
Tue Feb 21 14:41:09 UTC 2006
Andy Green wrote:
This is cute. However...
[snip]
> if [ ! -z "$pkg" ] ; then
> rpm -q --queryformat "%{NAME}-%{VERSION} %{LICENSE}" $pkg
> else
> echo "($1 is unpackaged)"
> fi
> echo
> fi
>
> #echo Depth $depth
>
> LIST1=`ldd $1 | tr -s ' ' | cut -d' ' -f 3 | grep ^/`
> for i in $LIST1 ; do
> package=`rpm -q --whatprovides $i`
> if [ -z "`grep $i /tmp/lider-list`" ] ; then
> echo -n "$i " >>/tmp/lider-list
> rpm -q --queryformat "%{NAME}-%{VERSION} %{LICENSE} \n" $package | head -n1 >>/tmp/lider-list
> $0 $i $(( $depth + 1 ))
> fi
> done
[snip]
You have a defect hiding in there. When I run it on a little
program or two I wrote in C, I get this output...
$ lider bin/keys
package no is not installed
package package is not installed
package provides is not installed
package bin/keys is not installed
Dependent Licenses
------------------
LGPL
Dependent Packages
------------------
glibc-2.3.3 LGPL
Dependent libs
--------------
/lib/ld-linux.so.2 glibc-2.3.3 LGPL
/lib/tls/libc.so.6 glibc-2.3.3 LGPL
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
More information about the fedora-list
mailing list