Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 2010 21:07:56 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= <des@des.no>
Cc:        freebsd-current@freebsd.org, gabor@freebsd.org
Subject:   Re: Official request: Please make GNU grep the default
Message-ID:  <AANLkTinZtyz=L32Pqch_m76zuSMK8FWaM=VWM70YZF%2B_@mail.gmail.com>
In-Reply-To: <86mxshdqgh.fsf@ds4.des.no>
References:  <AANLkTinPj0x=ZZ6w_hdkt1_DdZ19AvUoRzcZyCKY%2BndB@mail.gmail.com> <86mxshdqgh.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/20/10, Dag-Erling Sm=F8rgrav <des@des.no> wrote:
> "b. f." <bf1783@googlemail.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinZtyz=L32Pqch_m76zuSMK8FWaM=VWM70YZF%2B_>