Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494028 - app-portage/gentoolkit: euse -i SECURITY_HAZARD returns several grep failures
Summary: app-portage/gentoolkit: euse -i SECURITY_HAZARD returns several grep failures
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: InVCS
Depends on:
Blocks: 346443
  Show dependency tree
 
Reported: 2013-12-12 10:55 UTC by M. B.
Modified: 2016-02-11 13:08 UTC (History)
2 users (show)

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


Attachments
Proposed patch (euse_494028.patch,521 bytes, patch)
2014-12-17 02:56 UTC, William Throwe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?