Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98634 - equery ignores --nocolor (and -C and NOCOLOR environment variable) when --help is given
Summary: equery ignores --nocolor (and -C and NOCOLOR environment variable) when --hel...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-07-11 01:58 UTC by Alexander Wessel
Modified: 2006-01-17 19:09 UTC (History)
0 users

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


Attachments
Accepts --nocolor or NOCOLOR with --help (equery.diff,936 bytes, patch)
2005-09-13 00:36 UTC, Andres Pereira (RETIRED)
Details | Diff
Patch against equery 0.1.4 (equery.diff,1.21 KB, patch)
2005-09-13 00:49 UTC, Andres Pereira (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Wessel 2005-07-11 01:58:52 UTC
equery ignores --nocolor (and -C and NOCOLOR environment variable) when --help 
is given. 
  
Normaly equery honours --nocolor and the NOCOLOR environment variable, but 
there's one exception. Whenever --help is given on the commandline, output 
appears in color, regardless of the --nocolor option. I guess --help is 
captured early, and branches to another execution path, where --nocolor is not 
even tested. 
 
It's a minor bug, but should be easy to fix. 

Reproducible: Always
Steps to Reproduce:
1. equery --nocolor (works, no colors shown) 
2. equery --nocolor --help (shows colors) 
 



# equery --version   
equery(0.1.4) - Gentoo Package Query Tool   
Author(s): Karl Trygve Kalleberg  
  
could be related to bug 97462 and bug 78701.
Comment 1 Andres Pereira (RETIRED) gentoo-dev 2005-09-13 00:36:03 UTC
Created attachment 68330 [details, diff]
Accepts --nocolor or NOCOLOR with --help 

Although the man page says that <global-opt> has to be 'one' of the following:

-q, --quiet   - minimal output
-C, --nocolor - turn off colours
-h, --help    - this help screen
-V, --version - display version info

I think that equery should accept the fact that not all terminals support color
when displaying help. This patch should fix this.
Comment 2 Andres Pereira (RETIRED) gentoo-dev 2005-09-13 00:49:53 UTC
Created attachment 68333 [details, diff]
Patch against equery 0.1.4

The former patch was against equery 0.1.3
Comment 3 Paul Varner (RETIRED) gentoo-dev 2005-09-22 15:02:06 UTC
Fix is in subversion
Comment 4 Paul Varner (RETIRED) gentoo-dev 2005-09-23 15:50:05 UTC
Fix is in gentoolkit-0.2.1_pre8
Comment 5 Alexander Wessel 2005-11-18 05:38:03 UTC
Confirmed, works in gentoolkit-0.2.1_pre8. 
  
Thanks a million,  
Alexander Wessel  
Comment 6 Paul Varner (RETIRED) gentoo-dev 2006-01-17 19:09:29 UTC
Fixed in gentoolkit-0.2.1