From owner-freebsd-current@FreeBSD.ORG Sat Jul 24 04:41:50 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79C7D1065678; Sat, 24 Jul 2010 04:41:50 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 1B4C78FC0A; Sat, 24 Jul 2010 04:41:49 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 224CE14DC2A0; Sat, 24 Jul 2010 06:41:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qpqqJmJvJolQ; Sat, 24 Jul 2010 06:41:45 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id ED45F14DC294; Sat, 24 Jul 2010 06:41:44 +0200 (CEST) Message-ID: <4C4A6F00.9000203@FreeBSD.org> Date: Sat, 24 Jul 2010 06:41:36 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Doug Barton References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: [bsdgrep] grep -ql does not supress output 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: Sat, 24 Jul 2010 04:41:50 -0000 Em 2010.07.24. 6:19, Doug Barton escreveu: > There are several places in portmaster where I use '[e]grep -ql ' > to signal existence of something without having to deal with the > output of grep. In oldgrep this worked as advertised. In bsdgrep it > doesn't. > > Furthermore, looking at the code it doesn't seem like it's a trivial > fix since you seem to be conflating the idea of -q with "don't output > the matching lines" instead of "don't output anything" which is what > the old one did: > > case 'l': > Lflag = false; > lflag = qflag = true; > break; > > Also, looking at the code it's not clear to me that the -q option has > its previous behavior of halting processing for that file on the first > match, but I've only given it a quick look. > > So, request number 1, fix it so that bsdgrep -ql doesn't output > anything, and make sure that -q actually halts processing on the first > match. Of course both this and the color issue will be fixed. > > Request number 2, think about whether or not introducing this as the > default was the right course of action. I held my tongue on this when > you committed it, but in the past when such things have been added > they start life as an option, allowing those who choose to do so to > regression test them. Once they've had a shakeout period THEN the > switch is flipped to make them the default. I'm not at the point yet > where I'm ready to ask for you to change this, but between the color > thing and this issue, that ball has started to roll, in my mind at > least. We'll see what happens with more testing. This change was thoroughly tested on pointyhat and by several interested people even by you. Actually, the compatibility for non-standard GNU regexes were added when you requested it after trying out with portmaster. Why didn't you tell me earlier about this bug then, as well? Gabor