From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 16 04:37:23 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A75E106567D for ; Mon, 16 Jun 2008 04:37:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id F14278FC18 for ; Mon, 16 Jun 2008 04:37:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 14046 invoked by uid 399); 16 Jun 2008 04:37:22 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 16 Jun 2008 04:37:22 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4855EDFE.3010708@FreeBSD.org> Date: Sun, 15 Jun 2008 21:37:18 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.14 (X11/20080606) MIME-Version: 1.0 To: Andrey Chernov , K?vesd?n G?bor , Diomidis Spinellis , hackers@freebsd.org, Doug Barton , current@freebsd.org, "Sean C. Farley" , Max Khon References: <485453F2.60507@FreeBSD.org> <4854BC29.3060507@FreeBSD.org> <4854C96A.1080603@aueb.gr> <48556AAD.9010602@t-hosting.hu> <20080615212613.GA97326@nagual.pp.ru> In-Reply-To: <20080615212613.GA97326@nagual.pp.ru> X-Enigmail-Version: 0.95.6 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 04:37:23 -0000 Andrey Chernov wrote: > On Sun, Jun 15, 2008 at 09:17:01PM +0200, K?vesd?n G?bor wrote: >> Yes, of course, I haven't forgotten about your suggestion. First, I'd >> like to process the trivial errors, which come up like this one and make >> some tests myself. Then I'll think about this idea and ask portmgr to do >> an exp-run with BSD grep. I think that would be very valuable. > Please note that BSD grep is not localized (and can't be per design) and > works only with standard C locale. It may not affect ports system > processing but shurely affects real texts handling. That is very troubling. In this day and age localization is a requirement. I cannot imagine being supportive of adding something to the base that does not have this capability. I also found another gratuitous difference in behavior tonight, again from portmaster (which uses grep a LOT, which is why I thought to try it out in the first place). I do this type of thing in lots of places: pkg=/var/db/pkg/p5-Net-DNS-0.63 if grep -ql '^@pkgdep ' $pkg/+CONTENTS 2>/dev/null; then fi With gnu grep I get no output, and if there is a match the if statement just runs as I'd expect. With bsd grep I'm getting the name of the file as output. That's 3 strikes and you're out as far as I'm concerned. I think this project needs to come a lot closer to feature compatibility with gnu grep (including the ability to be localized) before it's ready for a wider audience. Of course, that's just my opinion. Doug -- This .signature sanitized for your protection