Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 1999 10:22:34 +1000
From:      "Andrew Reilly" <areilly@nsw.bigpond.net.au>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: A new package fetching utility, pkg_get
Message-ID:  <19990927102234.A53880@gurney.reilly.home>
In-Reply-To: <199909252352.BAA26437@dorifer.heim3.tu-clausthal.de>
References:  <199909252352.BAA26437@dorifer.heim3.tu-clausthal.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 26, 1999 at 01:52:36AM +0200, Oliver Fromme wrote:
> While we're talking about making package handling easier for
> newbies, I'd like to present two simple shell scripts that I
> wrote quite some time ago.  Yeah, I know I could send-pr this,
> but I'm not sure if they're really worth it (if someone thinks
> they are, then I'll send-pr them).

Here's a bit of me-too-erism, and (I hope) some food for thought
and discussion:

I've longed for a mechanism to keep the ports that I use as
up-to-date as the rest of my FreeBSD system.  Unfortunately,
some ports I don't use very often, and so forget that they're
there.

Unfortunately (again), the port name-version_number identifier
isn't _quite_ unique enough to use as a key for tracking ports.
For example: ssh and docbook have multiple versions for the same
base name installed concurrently.

What I'd like is a little weekly crontab script that runs after
my weekly ports cvsup, and tells me which of the ports that I
"subscribe to" has changed, so that I can think about rebuilding it.

This is the closest I've come, so far.  Comments and suggestions
welcome, of course:

pkg_info -a -q -I > tags
pkg_info -a -I | awk '{print $1}' | paste -d\| - tags | sort
-t\| -k 2 > alist
sort -t\| -k 4 /usr/ports/INDEX |\
  join -t\| -o1.1,2.1 -1 2 -2 4 alist - |\
    awk -F\| '{if ($1 != $2) print $1 "-->" $2}'

This throws up some obvious candidates, like:
mutt-1.0b1-->mutt-1.0b2

But also some dubious ones:
bzip2-0.9.0c-->bzip-0.21
bzip2-0.9.0c-->bzip2-0.9.5c

And some that seem to have different pkg_* names from the values
in the INDEX file:
squid-2.2-->squid-2.0
squid-2.2-->squid-2.1

This probably also loses for any ports where the comment field
has changed...

I've thought about parsing the "updated ports" list that gets
posted to usenet every (?) month or so, but that seems hard too.

-- 
Andrew


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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