From owner-freebsd-hackers Sun Sep 26 17:22:47 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from m4.c2.telstra-mm.net.au (m4.c2.telstra-mm.net.au [24.192.3.19]) by hub.freebsd.org (Postfix) with ESMTP id 348D9152F8 for ; Sun, 26 Sep 1999 17:22:43 -0700 (PDT) (envelope-from areilly@nsw.bigpond.net.au) Received: from m5.c2.telstra-mm.net.au (m5.c2.telstra-mm.net.au [24.192.3.20]) by m4.c2.telstra-mm.net.au (8.8.6 (PHNE_14041)/8.8.6) with ESMTP id KAA08574 for ; Mon, 27 Sep 1999 10:22:36 +1000 (EST) X-BPC-Relay-Envelope-From: areilly@nsw.bigpond.net.au X-BPC-Relay-Envelope-To: X-BPC-Relay-Sender-Host: m5.c2.telstra-mm.net.au [24.192.3.20] X-BPC-Relay-Info: Message delivered directly. Received: from areilly.bpc-users.org (CPE-24-192-49-170.nsw.bigpond.net.au [24.192.49.170]) by m5.c2.telstra-mm.net.au (8.8.6 (PHNE_14041)/8.8.6) with SMTP id KAA15989 for ; Mon, 27 Sep 1999 10:22:34 +1000 (EST) Received: (qmail 63987 invoked by uid 1000); 27 Sep 1999 00:22:34 -0000 From: "Andrew Reilly" Date: Mon, 27 Sep 1999 10:22:34 +1000 To: freebsd-hackers@FreeBSD.ORG Subject: Re: A new package fetching utility, pkg_get Message-ID: <19990927102234.A53880@gurney.reilly.home> References: <199909252352.BAA26437@dorifer.heim3.tu-clausthal.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i In-Reply-To: <199909252352.BAA26437@dorifer.heim3.tu-clausthal.de> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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