Speaking of trivial tools



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"



Relevant Pages

  • Re: package the right way?
    ... I'm compiling a bunch of notes I have on various plants. ... species, I'll have things listed like scientific name, common name, ... So, is the right approach here to create a new package, say "plants" ... you're following this sort of markup strictly then just about anything ...
    (comp.text.tex)
  • Can I update all combo boxes on all loaded forms?
    ... I found this code that uses a pretty interesting approach of bookmarking all ... adding a new product they find they also need to add a new package code, ... I was thinking some sort of combination of a function that lists all open ... forms and then a function that requeries them all. ...
    (microsoft.public.access.forms)
  • Re: Can I update all combo boxes on all loaded forms?
    ... What I do is to create a single function that handles the updating of any combos that are open on screen. ... I found this code that uses a pretty interesting approach of bookmarking all ... adding a new product they find they also need to add a new package code, ... I was thinking some sort of combination of a function that lists all open ...
    (microsoft.public.access.forms)
  • Re: [fw-wiz] Securing a Linux Firewall
    ... > sort of thing is always a pain -regardless- of what your typical machine ... The amount of churn in what is required between Solaris ... Solaris 9 is supposed to be better about package granularity, ... My assertion is that the maintenance cost of maintaining a "minimal" build, ...
    (Firewall-Wizards)
  • Re: installing new packages under mactex and texshop
    ... and documentation were not stored in separate places. ... related data into different parts of the directory tree. ... since it knows what sort of object it's looking for. ... every package on the tree. ...
    (comp.text.tex)