Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 1995 03:34:33 -0700
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        jacs@gnome.co.uk
Cc:        freebsd-ports@freebsd.org
Subject:   Re: simple perl script for ports update checking
Message-ID:  <199510171034.DAA07816@silvia.HIP.Berkeley.EDU>
In-Reply-To: <jacs-9509161112.AA00062262@hawk.gnome.co.uk> (message from Chris Stenton on Mon, 16 Oct 1995 12:12:13 %2B0100)

next in thread | previous in thread | raw e-mail | index | archive | help
 * Here is a simple perl script for checking the current ports tree 
 * against a users installed packages and notifying the user which ports 
 * have been either updated or removed.  I find this useful to keep my
 * 40 or so ports upto date.

This is really cool.  Some suggestions....

 * open(INDEXFH, "/usr/ports/INDEX")  || die "Could not open /usr/ports/INDEX";

The user can have the ports root directory can be in a place other
than "/usr/ports" by setting the environment variable PORTSDIR.

 *     $pkg =~ s/-.*/-/;
               ^^^^^^^^

Should be "s/-[^-]*$/-/", it is legal for a package name to include
more than one hyphen.  The version number is always after the last
hyphen though.

 * 	    print "updated too\t", $line;
                           ^^^
"to"? :)

Also, sometimes a user will have both the old and new versions in
/var/db/pkg because she just installed the new version (which
overwrote the old one but didn't erase the entry in /var/db/pkg).
Maybe wa can add a re-check for this?

This is totally neat.  May I make a port of it?  Or maybe we can sneak 
it into /usr/sbin via pkg_install or something.... :)

Satoshi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510171034.DAA07816>