bsdpak for package/port management

SourceForge.net: Project Info – BSDPak

I was reminded of this tool tonight and was glad to see I had kept a copy of it. It’s similar to portupgrade but it seems to work faster and is less confusing (to me, anyway).

Here’s what it offers:

BSDPak 0.51 – A package management helper for FreeBSD and NetBSD
Copyright (C) 2000-2001 Rodney “meff” Gordon II

Usage: bsdpak-0.51/bsdpak.pl [options]

Where options are one of the below:
–help Help. (What you’re reading now.)
–findpackage= Find a package, and its path in ports.
–installpackage= Find a package in ports, and install it.
(IN DEVELEOPMENT)
–upgradepackages Print commands to update your packages to
index versions.
–compare Compare currently installed packages with
the ports index.
Compare options:
–all Print comparison of all packages.
–needupdate Print packages that need updated.
–exceedindex Print packages that exceed the ports index.
–uptodate Print up to date packages.
–index=
Specify a path or url to use for the index file.

By default this program uses /usr/ports/INDEX or /usr/pkgsrc/INDEX
for the index packages, and pkg_info output for current packages.
Current info is not yet customizable (you shouldn’t have to change
it.) However, the index path is, by using the previously mentioned
–index option, which may specify a path or URL.


It can generate an upgrade script for you (you need to supply the she-bang line):

(root@blue.paulbeard.org)-(09:30 PM / Wed Oct 09)
[/home/paul]# echo ‘#!/bin/sh’ > upgrade.sh && bsdpak-0.51/bsdpak.pl –upgradepackages >> upgrade.sh
(root@blue.paulbeard.org)-(09:31 PM / Wed Oct 09)
[/home/paul]# more upgrade.sh
#!/bin/sh
# UpgradePackages script generated by bsdpak 0.51

# DETAIL
# cups-pstoraster 7.05.3 needs updating (index has 7.05.5)
# portupgrade 20020902 needs updating (index has 20020921.1)
# bzip2 1.0.1 needs updating (index has 1.0.2)

# REMOVE PASS
pkg_delete -f -R cups-pstoraster-7.05.3
pkg_delete -f -R portupgrade-20020902
pkg_delete -f -R bzip2-1.0.1

# BUILD PASS
cd /usr/ports/print/cups-pstoraster
make update REINSTALL=YES
make clean-update clean-depends
cd /usr/ports/sysutils/portupgrade
make update REINSTALL=YES
make clean-update clean-depends
cd /usr/ports/archivers/bzip2
make update REINSTALL=YES
make clean-update clean-depends