On 8/20/10, Dag-Erling Smørgrav <des_at_des.no> wrote: > "b. f." <bf1783_at_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 categories. *** Error code 1 Stop in /mnt/disk2/usr/ports/math/maxima. >From bsd.port.mk: 2941 VALID_CATEGORIES+= 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 _at_if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \ 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+=\040accessibility\040afterstep\040arabic\040archivers\040astro\040audio\040\\\$ \011benchmarks\040biology\040cad\040chinese\040comms\040converters\040databases\040\\\$ \011deskutils\040devel\040docs\040dns\040editors\040elisp\040emulators\040finance\040french\040ftp\040\\\$ \011games\040geography\040german\040gnome\040gnustep\040graphics\040hamradio\040haskell\040hebrew\040hungarian\040\\\$ \011ipv6\040irc\040japanese\040java\040kde\040kld\040korean\040lang\040linux\040lisp\040\\\$ \011mail\040math\040mbone\040misc\040multimedia\040net\040net-im\040net-mgmt\040net-p2p\040news\040\\\$ \011palm\040parallel\040pear\040perl5\040plan9\040polish\040portuguese\040ports-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.Received on Fri Aug 20 2010 - 19:07:58 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC