From owner-freebsd-audit Thu May 16 8:48:15 2002 Delivered-To: freebsd-audit@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (Postfix) with ESMTP id F38D337B42B; Thu, 16 May 2002 08:47:13 -0700 (PDT) Received: (from reg@localhost) by shale.csir.co.za (8.11.6/8.11.6) id g4GFkiq39615; Thu, 16 May 2002 17:46:44 +0200 (SAT) (envelope-from reg) Date: Thu, 16 May 2002 17:46:44 +0200 From: Jeremy Lea To: "Bruce A. Mah" Cc: audit@FreeBSD.ORG, ports@FreeBSD.ORG, sobomax@FreeBSD.ORG Subject: Re: pkg_version in C [was: Re: Perl scripts that need rewriting - Progress!] Message-ID: <20020516174644.A38650@shale.csir.co.za> References: <200205091933.g49JXMjV041629@grimreaper.grondar.org> <20020514145039.B13083@shale.csir.co.za> <200205141714.g4EHELC5007391@intruder.bmah.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200205141714.g4EHELC5007391@intruder.bmah.org>; from bmah@FreeBSD.ORG on Tue, May 14, 2002 at 10:14:21AM -0700 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, On Tue, May 14, 2002 at 10:14:21AM -0700, Bruce A. Mah wrote: > 1. The version comparisons passed all of the regression tests that knu > and I made for the original pkg_version (test-pkg_version.sh). This > gives me a nice warm fuzzy feeling about that part of the code. Of course it does... I wouldn't have posted it otherwise! ;-) > 4. You commented that you didn't like the way we did "-s" before. If > you think it'd be better as (say) a regex or a globbing expression, I > don't believe there'd be much problem with going that route. knu > used globbing when he wrote portversion, if you want some precedent. Well, the pkg_* utilities each work in the same way - they take a list of packages on the command line or a -a flag for all. They then work over that list one package at a time... I think it would be a bad idea to change any of command line flags now. I've never quite figured out why we have both globbing and regex matching in pkg_* though... Anyway, a revised patch is at: http://people.freebsd.org/~reg/pkg_version.patch Besides people's comments, there are a few changes to the comparison (multiple matches didn't work in the first version), and I've made the name matching more strict. I was asked to CC -audit, so I've dropped -current from the list. Regards, -Jeremy -- FreeBSD - Because the best things in life are free... http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message