From owner-freebsd-current Tue May 14 15:37:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id EB6BE37B406; Tue, 14 May 2002 15:37:22 -0700 (PDT) Received: from bmah.dyndns.org ([12.233.149.189]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020514171424.CVCL12058.rwcrmhc53.attbi.com@bmah.dyndns.org>; Tue, 14 May 2002 17:14:24 +0000 Received: from intruder.bmah.org (localhost [IPv6:::1]) by bmah.dyndns.org (8.12.3/8.12.3) with ESMTP id g4EHENL8007392; Tue, 14 May 2002 10:14:23 -0700 (PDT) (envelope-from bmah@intruder.bmah.org) Received: (from bmah@localhost) by intruder.bmah.org (8.12.3/8.12.3/Submit) id g4EHELC5007391; Tue, 14 May 2002 10:14:21 -0700 (PDT) Message-Id: <200205141714.g4EHELC5007391@intruder.bmah.org> X-Mailer: exmh version 2.5+ 20020506 with nmh-1.0.4 To: Jeremy Lea Cc: Mark Murray , "Bruce A. Mah" , current@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: pkg_version in C [was: Re: Perl scripts that need rewriting - Progress!] In-reply-to: <20020514145039.B13083@shale.csir.co.za> References: <200205091933.g49JXMjV041629@grimreaper.grondar.org> <20020514145039.B13083@shale.csir.co.za> Comments: In-reply-to Jeremy Lea message dated "Tue, 14 May 2002 14:50:39 +0200." From: bmah@FreeBSD.ORG (Bruce A. Mah) Reply-To: bmah@FreeBSD.ORG X-Face: g~c`.{#4q0"(V*b#g[i~rXgm*w;:nMfz%_RZLma)UgGN&=j`5vXoU^@n5v4:OO)c["!w)nD/!!~e4Sj7LiT'6*wZ83454H""lb{CC%T37O!!'S$S&D}sem7I[A 2V%N&+ X-Image-Url: http://www.employees.org/~bmah/Images/bmah-cisco-small.gif X-Url: http://www.employees.org/~bmah/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 14 May 2002 10:14:21 -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG If memory serves me right, Jeremy Lea wrote: > On Thu, May 09, 2002 at 08:33:22PM +0100, Mark Murray wrote: > > /usr/sbin/pkg_version Jeremy Lea - re > > OK, the first revision is attached. It appears to work for me... It > needs some spit and polish, and probably a few more people to test. > > I've not implemented the -d flag since it sort of became unneeded, and > it's not really the way things are done in the rest of pkg_*. I've also > not implemented -c. There were enough warnings that it wasn't really > useful, and portupgrade does a much better job... Hi Jeremy-- This looks very nice. I'll let Maxim and other ports gurus comment on the coding, and content myself with some high-level comments: 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. 2. "-c" is still in the usage message, even though it's not in the code anymore (yay!). Might want to take this out. 3. The AUTHORS section in the manpage isn't marked up quite right. I'd recommend something like this: ----- .Sh AUTHORS The .Nm utility was written by .An Jeremy D. Lea Aq reg@FreeBSD.org , partially based on a Perl script written by .An Bruce A. Mah Aq bmah@FreeBSD.org . ----- 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. Good job! Bruce. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message