From owner-freebsd-questions@FreeBSD.ORG Fri Jul 9 20:47:43 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B2C316A4CE for ; Fri, 9 Jul 2004 20:47:43 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA97343D39 for ; Fri, 9 Jul 2004 20:47:41 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i69KlZ7p037526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 9 Jul 2004 21:47:36 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i69KlZCm037525 for freebsd-questions@freebsd.org; Fri, 9 Jul 2004 21:47:35 +0100 (BST) (envelope-from matthew) Date: Fri, 9 Jul 2004 21:47:35 +0100 From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: <20040709204735.GA37067@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , freebsd-questions@freebsd.org References: <20040708172916.GB15679@millerlite.local.mark-and-erika.com> <20040708192245.GA11705@happy-idiot-talk.infracaninophile.co.uk> <20040708202313.GA11771@millerlite.local.mark-and-erika.com> <20040708210535.GA57010@happy-idiot-talk.infracaninophile.co.uk> <20040709192245.GC11771@millerlite.local.mark-and-erika.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20040709192245.GC11771@millerlite.local.mark-and-erika.com> User-Agent: Mutt/1.5.6i X-Greylist: Message not sent from an IPv4 address, not delayed by milter-greylist-1.5.3 (smtp.infracaninophile.co.uk [0.0.0.0]); Fri, 09 Jul 2004 21:47:36 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040705, clamav-milter version 0.74a on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk Subject: Re: "make search" oddity X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 20:47:43 -0000 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 09, 2004 at 03:22:45PM -0400, Mark Frank wrote: > * On Thu, Jul 08, 2004 at 10:05:35PM +0100 Matthew Seaman wrote: > > Hmmm... what awk(1) program is first on your path? And if it isn't > > the default version supplied with the system (/usr/bin/awk -- in 4.10 > > this is actually GNU Awk 3.0.6) does it support 'IGNORECASE'? There's > > this little snippet in the awk(1) man page: > >=20 > > NOTE: In versions of gawk prior to 3.0, IGNORECAS= E only > > affected regular expression operations. It now = affects > > string comparisons as well. >=20 > I only have one copy of awk on the box. Things like awk I usually take > for granted and don't think about. Here's what I think I see, please > correct me if I'm wrong. If you're using the version of awk supplied with the system and the systems you're running aren't hugely out of date, then you shouldn't have a problem. =20 > On all my 5.2.1-RELEASE boxes the version of awk appears to be the > one-true-awk which I believe is the old AT&T/Lucent awk. I don't know > how to extract the exact version number but obviously doesn't support > IGNORECASE. I've never done anything intentionally to change versions > of awk on any of these. Hmmm... The 5.x awk(1) man page certainly doesn't mention IGNORECASE (which is a GNU extension and not in the POSIX awk specification). I do think it odd that all those improvements to the ports search facility should have been committed with a large chunk of functionality not working under 5.x. None the less, that appears to have been the case. IGNORECASE support hasn't been added to the one-true-awk in 5.x as far as I can tell. I can find no mention of it searching through the sources via cvsweb.cgi -- mind you, that may well be because I just didn't manage to search very effectively. Could you try running this command on a 5.x system? % echo aB | awk 'BEGIN { IGNORECASE=3D1; } /ab/ { print "IGNORECASE wor= ks" }' On 4.x that prints out 'IGNORECASE works' -- from what you've said, I'd expect no output on 5.x Looks like you've spotted a bug. =20 > The only 4.x system I have is a 4.8 box which has never gone through a > buildworld/installworld cycle (it's a poor old Pentium that's just used > as a caching DNS server in my LAN) and it does have GNU Awk 3.0.6 on it. > If I did a buildworld/installworld on it, would it use the Makefile in > /usr/src/usr.bin/awk, which seems to point to the source for the > one-true-awk? No -- 4.x uses and will use GNU awk all the way. It's one of those policy things: not to make potentially disruptive changes like replacing an important application with one using a completely different software base within the life of a system major version. With 5.x they've switched to a BSD licensed awk(1) implementation. They're going to do much the same with tar(1), if they haven't already -- so long as they can make the switch before 5.3 goes stable. If they miss that, bsdtar will have to wait until 6.x. Ultimately the idea is to provide a purely BSD licensed system, but it will be quite a long time before there's a suitable replacement for gcc(1) and the rest of the compiler toolchain available. > I do see the GNU version of awk in ports, gawk-3.1.1_1. Should I be > using that? Will it break something else if I install it and link > /usr/bin/awk to it? You can certainly install gawk from ports if you want, but I wouldn't go replacing the system version with it -- awk(1) is vital for rebuilding world, kernel and you wouldn't want to run the risk of breaking that. After all, being able to do a case insensitive search of the ports INDEX is not actually that important in the grand scheme of things. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --liOOAslEiF7prFVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA7wRniD657aJF7eIRAvJIAJsEoyhu5gGBMgfI33zr/OVq+v8DnwCdHSFQ 2Hjpo2M1qiMXwTnoAvlS/xM= =tbnN -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--