Speaking of trivial tools
- From: Mike Meyer <mwm-keyword-freebsdhackers2.e313df@xxxxxxxxx>
- Date: Mon, 28 Aug 2006 21:01:13 -0400
I realized today that this one was possible. I suspect it would be
useful to lots of people working on ports, as well as for the sysadmin
stuff I do with it. I'm just not sure where it should goes.
-------------------- checkdeps.sh
#!/bin/sh
TMPFILE=/tmp/checkdeps.$$
pkg_info -r $1 | sed -n 's/Dependency: //p' | sort -u > $TMPFILE
ldd $(pkg_info -L $1) 2>/dev/null | \
sed -e '/^\//d' -e 's/.*=> //' -e 's/(.*)//' | \
sort -u | \
xargs -n 1 pkg_info -W | \
sed 's/.* //' | \
grep -v $1 | \
sort -u | \
comm -23 - $TMPFILE
rm $TMPFILE
--------------------
Hand it a package name as an argument, and it'll print out the names
of any packages providing libraries used by binaries in the package
given as an argument that aren't listed as a dependency for that
package. I fed it my complete list of packages, and it turned up some
interesting things - like a package that had a dependency on a newer
version of itself(!).
This is just a QAD hack. It certainly got a lot of rough edges yet.
<mike
--
Mike Meyer <mwm@xxxxxxxxx> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Speaking of trivial tools
- From: Kris Kennaway
- Re: Speaking of trivial tools
- Prev by Date: Re: A handy utility (at least for me)
- Next by Date: Hard disk going-bad detection
- Previous by thread: jails, cron and sendmail
- Next by thread: Re: Speaking of trivial tools
- Index(es):
Relevant Pages
|