From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 21:07:58 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 CD77A1065674; Fri, 20 Aug 2010 21:07:58 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 33CF48FC24; Fri, 20 Aug 2010 21:07:57 +0000 (UTC) Received: by eyx24 with SMTP id 24so2411483eyx.13 for ; Fri, 20 Aug 2010 14:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=QPvrOUVDggN5tD/W2dmTsQzjqVNfufNIOtXOhZtcjTk=; b=AWURJJ7hKtv41pMelcdFEllHYCgmJgFwduv25IhKgMIliNnyKAsMbPaQ+2Zxf2UafU a+sTq8drKfXeU1YArsYoy3xm4H0QQ7LBojM9iPluTyiaI/YBKwCH9VAzx92qKXJkTe6u 8S/jSAUibm0ZjgMmPPBnFuMYIZSXAhlrABuWE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=guGHNZKvN3SWa38tlJ6Kxks02pO2UzbRGyQfGd99fSJNRb6W1FgouBmxaqRh3NZxV/ XSicz2c+XjjZ2UfJuluJNDWlg91UfQaweyCWrKXJYB2tiJuLATN3weoyzC9Rz82OEBC7 D78XBggtNTnJIPaDrWA0d7fLr90F2jJEv54rU= MIME-Version: 1.0 Received: by 10.216.155.206 with SMTP id j56mr1759821wek.67.1282338476323; Fri, 20 Aug 2010 14:07:56 -0700 (PDT) Received: by 10.216.183.212 with HTTP; Fri, 20 Aug 2010 14:07:56 -0700 (PDT) In-Reply-To: <86mxshdqgh.fsf@ds4.des.no> References: <86mxshdqgh.fsf@ds4.des.no> Date: Fri, 20 Aug 2010 21:07:56 +0000 Message-ID: From: "b. f." To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, gabor@freebsd.org Subject: Re: Official request: Please make GNU grep the default X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 21:07:58 -0000 On 8/20/10, Dag-Erling Sm=F8rgrav wrote: > "b. f." writes: >> At r211506, 'grep -wq' does not seem to work properly (in the very >> least, it is not the same as with GNU grep), > > "Does not seem to work properly" is not a very useful statement. The > least you could do is provide an example. I did provide an example, later in the same sentence that you quoted. Using a current ports tree, go to a port with 'lisp' in CATEGORIES, and run any ports target that requires 'check-categories', e.g.: make -C /usr/ports/math/maxima check-categories maxima-5.22.1: Makefile error: category lisp not in list of valid categorie= s. *** Error code 1 Stop in /mnt/disk2/usr/ports/math/maxima. >From bsd.port.mk: 2941 VALID_CATEGORIES+=3D accessibility afterstep arabic archivers astro audio \ 2942 benchmarks biology cad chinese comms converters databases \ 2943 deskutils devel docs dns editors elisp emulators finance french ftp \ 2944 games geography german gnome gnustep graphics hamradio haskell hebrew hungarian \ 2945 ipv6 irc japanese java kde kld korean lang linux lisp \ 2946 mail math mbone misc multimedia net net-im net-mgmt net-p2p news \ 2947 palm parallel pear perl5 plan9 polish portuguese ports-mgmt= \ 2948 print python ruby rubygems russian \ 2949 scheme science security shells spanish sysutils \ 2950 tcl textproc tk \ 2951 ukrainian vietnamese windowmaker www \ 2952 x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes \ 2953 x11-toolkits x11-wm xfce zope 2954 2955 check-categories: 2956 .for cat in ${CATEGORIES} 2957 @if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; t= hen \ 2958 ${TRUE}; \ 2959 else \ 2960 ${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories. 2960 "; \ 2961 ${FALSE}; \ 2962 fi 2963 .endfor A closer look at VALID_CATEGORIES, using vis -oltw: VALID_CATEGORIES+=3D\040accessibility\040afterstep\040arabic\040archivers\0= 40astro\040audio\040\\\$ \011benchmarks\040biology\040cad\040chinese\040comms\040converters\040datab= ases\040\\\$ \011deskutils\040devel\040docs\040dns\040editors\040elisp\040emulators\040f= inance\040french\040ftp\040\\\$ \011games\040geography\040german\040gnome\040gnustep\040graphics\040hamradi= o\040haskell\040hebrew\040hungarian\040\\\$ \011ipv6\040irc\040japanese\040java\040kde\040kld\040korean\040lang\040linu= x\040lisp\040\\\$ \011mail\040math\040mbone\040misc\040multimedia\040net\040net-im\040net-mgm= t\040net-p2p\040news\040\\\$ \011palm\040parallel\040pear\040perl5\040plan9\040polish\040portuguese\040p= orts-mgmt\040\\\$ \011print\040python\040ruby\040rubygems\040russian\040\\\$ \011scheme\040science\040security\040shells\040spanish\040sysutils\040\\\$ \011tcl\040textproc\040tk\040\\\$ \011ukrainian\040vietnamese\040windowmaker\040www\040\\\$ \011x11\040x11-clocks\040x11-drivers\040x11-fm\040x11-fonts\040x11-servers\= 040x11-themes\040\\\$ \011x11-toolkits\040x11-wm\040xfce\040zope\$ The lisp category is the only category that causes a problem with the new bsdgrep, and I didn't take the time to analyze why ( which is why I was not more specific in my original message). 'lisp' is preceded by 'elisp', which would normally be a match for the 'lisp' in a port Makefile, were it not for the -w flag. 'x11' succeeds, but it precedes all of the x11-* categories. I suspect that there is an error in the logic of either the -w or the -q flag implementation in bsdgrep, which causes problems when the two options are used together. The target succeeds as expected with GNU grep. b.