Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410137 - app-portage/gentoolkit- euse misuse of egrep -r searches recursively
Summary: app-portage/gentoolkit- euse misuse of egrep -r searches recursively
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
Depends on:
Blocks: 346443
  Show dependency tree
Reported: 2012-03-29 12:54 UTC by Vlad B.
Modified: 2012-05-16 22:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Vlad B. 2012-03-29 12:54:31 UTC
With the following packages installed:

In the euse file, line 1144:
if [[ -n $(echo "${line}" | egrep -re "^[^#]*${PACKAGE} ") ]]; then

egrep -re takes a long time to finish because it recursively checks all
files in cwd.

This is because the behaviour of grep changed as follows in the 2.11 release:



* Noteworthy changes in release 2.11 (2012-03-02) [stable]

** New features

If no file operand is given, and a command-line -r or equivalent
option is given, grep now searches the working directory. Formerly
grep ignored the -r and searched standard input nonrecursively.
An -r found in GREP_OPTIONS does not have this new effect.

I think the -r is not needed here. I removed it and everything seems to
work fine.
Comment 1 Paul Varner (RETIRED) gentoo-dev 2012-04-11 17:44:53 UTC
Thanks!  Fixed in the following commit:;a=commit;h=34f3d9824db09afe71e5254e2f75f9379b7c2b63
Comment 2 Paul Varner (RETIRED) gentoo-dev 2012-05-16 22:12:20 UTC
This was released in gentoolkit-