portdeps

So why yet another ports update tool? My answer is simple: None of the existing tools fulfills my requirement for a straight-forward, easy-to-use updating tool. Some of the existing tools create databases that spill my disk (and perhaps get confused if I manually update a specific port), others require lots of user intervention, etc. I just wanted something that spits out the appropriate commands to update my ports, and that's it. I started with exploring the port dependencies, hence the name.

Here are the features of my portdeps script:

In practice you would just run

portdeps

and receive this output:

# security/ipsec-tools needs updating: installed ipsec-tools-0.6.4_1, in ports ipsec-tools-0.6.4_2
# textproc/expat2 needs updating: installed expat-1.95.8_3, in ports expat-2.0.0
# www/apache13 needs updating: installed apache-1.3.34_3, in ports apache-1.3.34_4
# devel/gmake needs updating: devel/gettext is more recent than devel/gmake
# ftp/wget needs updating: devel/gettext is more recent than ftp/wget
make -C /usr/ports/security/ipsec-tools all deinstall install clean &&
make -C /usr/ports/textproc/expat2 all deinstall install clean &&
make -C /usr/ports/ftp/wget all deinstall install clean &&
make -C /usr/ports/devel/gmake all deinstall install clean &&
 make -C /usr/ports/security/rkhunter all deinstall install clean &&
 make -C /usr/ports/www/apache13 all deinstall install clean &&
  make -C /usr/ports/hmo/apache-contrib-mod_urlcount all deinstall install clean &&
true

Then check this output, and either cut-and-paste this into a shell window, or feed it into a pipe:

portdeps | sh

That's the whole story. Simple and stupid, but very effective and handy.

Ah, there's a downside: This is hard-core perl. Zero documentation apart from the source.

Just drop me a mail if you have suggestions. Please keep in mind that this is intended as a simple, handy tool rather than a full-featured package with lots of knobs.


automagically generated for 38.103.63.59 at 13 Oct 2008 08:49:44 CEST
last modified by myself at 12 Nov 2007 12:32:52 CET
accessed 1230 times since 31 Jan 2006 21:04:07 CET
validated HTML 4.01