Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410137 - app-portage/gentoolkit-0.3.0.5: euse misuse of egrep -r searches recursively
Summary: app-portage/gentoolkit-0.3.0.5: euse misuse of egrep -r searches recursively
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
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: ---


Attachments

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:
app-portage/gentoolkit-0.3.0.5
sys-apps/grep-2.11

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:

[http://savannah.gnu.org/forum/forum.php?forum_id=7132]:

NEWS

* 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: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=34f3d9824db09afe71e5254e2f75f9379b7c2b63
Comment 2 Paul Varner (RETIRED) gentoo-dev 2012-05-16 22:12:20 UTC
This was released in gentoolkit-0.3.0.6