From owner-freebsd-current@FreeBSD.ORG Sun Jun 15 07:49:13 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 7633D1065671; Sun, 15 Jun 2008 07:49:13 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id CA8AB8FC18; Sun, 15 Jun 2008 07:49:12 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-06.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-04.forthnet.gr (8.14.3/8.14.3) with ESMTP id m5F7nAOc015967; Sun, 15 Jun 2008 10:49:10 +0300 Received: from MX-IN-05.forthnet.gr (mx-in-05.forthnet.gr [193.92.150.32]) by mx-av-06.forthnet.gr (8.14.3/8.14.3) with ESMTP id m5F7nA5A026528; Sun, 15 Jun 2008 10:49:10 +0300 Received: from [192.168.136.22] (adsl116-189.kln.forthnet.gr [77.49.235.189]) by MX-IN-05.forthnet.gr (8.14.3/8.14.3) with ESMTP id m5F7n4oY028895; Sun, 15 Jun 2008 10:49:06 +0300 Authentication-Results: MX-IN-05.forthnet.gr smtp.mail=dds@aueb.gr; spf=neutral Authentication-Results: MX-IN-05.forthnet.gr header.from=dds@aueb.gr; sender-id=neutral Message-ID: <4854C96A.1080603@aueb.gr> Date: Sun, 15 Jun 2008 10:48:58 +0300 From: Diomidis Spinellis 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: 7bit X-Mailman-Approved-At: Sun, 15 Jun 2008 11:17:12 +0000 Cc: Max Khon , hackers@FreeBSD.org, Gabor Kovesdan , "Sean C. Farley" , current@FreeBSD.org 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: Sun, 15 Jun 2008 07:49:13 -0000 Doug Barton wrote: > 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 To avoid these problems I had proposed to instrument getopt to write options passed through argv in a file, build all our ports, and look at the options used.