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

Bug 494028

Summary: app-portage/gentoolkit: euse -i SECURITY_HAZARD returns several grep failures
Product: Portage Development Reporter: M. B. <tomboy64>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: normal CC: esigra, wtt6
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 346443    
Attachments: Proposed patch

Description M. B. 2013-12-12 10:55:10 UTC
When running `euse -i SECURITY_HAZARD`, the output looks like this:

$ euse -i SECURITY_HAZARD 
global use flags (searching: SECURITY_HAZARD)
************************************************************
no matching entries found

local use flags (searching: SECURITY_HAZARD)
************************************************************
grep: Unmatched ( or \(
grep: Unmatched ( or \(
grep: Unmatched ( or \(
grep: Unmatched ( or \(
grep: Unmatched ( or \(
grep: Unmatched ( or \(
[-      ] SECURITY_HAZARD - Allow non-root users to flood (ping
    net-misc/iputils: f). This is generally a very bad idea.
grep: Unmatched ( or \(
              20101006-r2 [gentoo]
grep: Unmatched ( or \(
              20121221 [gentoo]
grep: Unmatched ( or \(
              20121221-r1 [gentoo]
grep: Unmatched ( or \(
              99999999 [gentoo]


When querying several use-flags this result is limited to iputils.
I could reproduce it on my arm as well as on an amd64-VM.

Reproducible: Always
Comment 1 William Throwe 2014-12-17 02:56:29 UTC
Created attachment 391832 [details, diff]
Proposed patch

This was caused by a parsing bug triggered by local descriptions containing the string " -".  If the " -" happened to be in parentheses the grep errors occurred, otherwise euse -i just produced malformed output.  I've attached a patch against euse from app-portage/gentoolkit-0.3.0.9-r2 .
Comment 2 Paul Varner (RETIRED) gentoo-dev 2015-10-16 17:48:31 UTC
(In reply to William Throwe from comment #1)
> Created attachment 391832 [details, diff] [details, diff]
> Proposed patch
> 
> This was caused by a parsing bug triggered by local descriptions containing
> the string " -".  If the " -" happened to be in parentheses the grep errors
> occurred, otherwise euse -i just produced malformed output.  I've attached a
> patch against euse from app-portage/gentoolkit-0.3.0.9-r2 .

I really should review bug reports more often. Your patch would have saved me a lot of time when I noticed the bug on my system.  Anyhow the fix is in the git repository and will be included in the next release

https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=e6f03e5fb6c26f9ada7fabf25126a135f5ef1dbf
Comment 3 M. B. 2016-02-11 13:08:57 UTC
guys, this thing is fixed and still blocks the tracker?