Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 370085

Summary: app-portage/gentoolkit-0.3.0.3: euse should ignore/workaround GREP_OPTIONS
Product: Portage Development Reporter: Peter Alfredsen (RETIRED) <loki_val>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: CONFIRMED ---    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Peter Alfredsen (RETIRED) gentoo-dev 2011-06-05 10:16:39 UTC
GREP_OPTIONS is a global variable that can be set in the local .bashrc or even in env.d that specifies default options for grep. When GREP_OPTIONS="--colour=yes", The output of euse -i mp3 goes like this:
loki ~ # euse -i mp3
global use flags (searching: mp3)
************************************************************
no matching entries found

local use flags (searching: mp3)
************************************************************
[+ C    ] mp3
    media-sound/xwax:  Sets runtime dependencies to 
    support decoding MP3 audio.
egrep: Unmatched [ or [^
grep: Unmatched ) or \)
grep: Unmatched [ or [^
[...]

Euse should either add:
unset GREP_OPTIONS
which would solve this for all possible cases or workaround by doing:
GREP_OPTIONS+=" --colour=no"


Reproducible: Always