From owner-freebsd-current@FreeBSD.ORG Tue Jun 17 18:52:03 2008 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65638106568E; Tue, 17 Jun 2008 18:52:03 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from viefep11-int.chello.at (viefep11-int.chello.at [62.179.121.31]) by mx1.freebsd.org (Postfix) with ESMTP id 161678FC14; Tue, 17 Jun 2008 18:52:01 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from [89.134.207.231] by viefep11-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20080617185200.IXOU8896.viefep11-int.chello.at@[89.134.207.231]>; Tue, 17 Jun 2008 20:52:00 +0200 Message-ID: <485807CD.1030601@FreeBSD.org> Date: Tue, 17 Jun 2008 20:51:57 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Doug Barton References: <485453F2.60507@FreeBSD.org> <4854BC29.3060507@FreeBSD.org> In-Reply-To: <4854BC29.3060507@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Diomidis Spinellis , hackers@FreeBSD.org, current@FreeBSD.org, "Sean C. Farley" , Max Khon Subject: Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 18:52:03 -0000 Doug Barton escribió: > I use the following construct in portmaster, where pdb=/var/db/pkg, > origin is set to the origin of a given port, and ro_opd is usually > empty, but can be another origin directory or the same one. To > guarantee that you should get some kind of results you can test with > origin=devel/gettext. > > egrep -l "DEPORIGIN:($origin|$ro_opd)$" $pdb/*/+CONTENTS > > Obviously this works in portmaster with the gnu grep, but if ro_opd is > unset with the bsd grep I get: > > egrep: empty (sub)expression > I've looked at this and I have a patch with a workaround: http://kovesdan.org/patches/grep.dougb.diff Could you please try it if you have some time? I suppose that it will fix your case as it has fixed the 77th Spencer test of the GNU regression test suite, which comes with GNU grep. I'm afraid there isn't a better solution as this regression is coming from the different regex interpretations between the GNU regex library and our libc regex library. regex(3) says that the RE standard has some ambiguities and the particular implementation should make a decision how to handle these cases. Regards, Gábor P.S.: Thanks for the WITHOUT_GNU_GREP knob, I hope we will make use of it soon, I'm trying to eliminate the remaining regressions.