Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#15330 - [grep] -w does not work correctly since 2.5.4-2

Attached to Project: Arch Linux
Opened by Dario Bazzichetto (headhunter242) - Wednesday, 01 July 2009, 10:17 GMT
Last edited by Allan McRae (Allan) - Friday, 03 July 2009, 13:18 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Starting with version 2.5.4-2 of the grep package (I'm using the i686 version, don't know the x86-64 ones) the -w parameter does not work anymore in the correct way.
It gives as output only the word we are searching for (if found) and not the entire line.
The previous version 2.5.4-1 was ok.

Additional info:
* package version(s)
* config and/or log files etc.

Steps to reproduce:
For example.
echo "11 22 33 44 55" | grep -w 33
You get only 33 as output instead of 11 22 33 44 55

This task depends upon

Closed by  Allan McRae (Allan)
Friday, 03 July 2009, 13:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  grep 2.5.4-3
Comment by Roman Kyrylych (Romashka) - Wednesday, 01 July 2009, 11:08 GMT
I confirm this on x86_64 here. The behaviour differs from what is said in the man page.
@ Allan: the problem is caused by 65-dfa-optional.patch which was added due to  FS#14877 .
The patch says:
"The DFA algorithm is slow with mutlibytes characters.
This patch disables the DFA algorithm, but it can be re-enabled by setting
the GREP_USE_DFA environment variable."
Now compare `man grep | grep -w -e "option"`
with `man grep | GREP_USE_DFA=1 grep -w -e "option"`
I think it should be reported upstream too.
Comment by Allan McRae (Allan) - Wednesday, 01 July 2009, 12:18 GMT
Maybe Debain has yet another patch to fix this... I just can't win! :P
Comment by Jan de Groot (JGC) - Wednesday, 01 July 2009, 13:46 GMT Comment by Dario Bazzichetto (headhunter242) - Thursday, 02 July 2009, 10:09 GMT
I don't know how many packages are affected by this bug but I can say that other than the script I made to show Volume dialog on KDE4 for my T60 (, also WICD is behaving very strange.
I'm not able to connect anymore using DHCP on my local wired network and it prefer always the wifi connection to the wired one.
Comment by Gerhard Brauer (GerBra) - Thursday, 02 July 2009, 15:57 GMT
A downgrade to 2.5.4-1 is a temporary workaround.
(Affected is also ding, with this tool i found the grep prob and then this report....)