[elrepo] nvidia-detect feature enhancement

Phil Perry phil at elrepo.org
Fri Feb 13 12:27:03 EST 2015


On 13/02/15 16:40, Pat Riehecky wrote:
> 
> On 02/13/2015 10:32 AM, Phil Perry wrote:
>> On 13/02/15 15:39, Pat Riehecky wrote:
>>> On 02/13/2015 09:04 AM, Phil Perry wrote:
>>>> The only thing I'm unsure how to handle is nvidia-detect's warning
>>>> messages. I don't really want to suppress these by default, but if we
>>>> don't then yum will treat them as a list of arguments and try to parse
>>>> them (not what we want).
>>> Could the warnings be sent to STDERR?  I can send a patch if that sounds
>>> viable.
>>>
>>> Pat
>>>
>> Thanks Pat.
>>
>> Yes they could. The only problem I see is STDERR is written to the
>> console by default so would still need to be redirected (see my previous
>> reply).
>>
>>
> 
> My memory says typically $() and `` don't capture STDERR.
> 
> Quick tests seem to support that:
> 
> yum install `echo thing >&2`
> yum install $(echo thing >&2)
> 
> (also, pull request sent for errors to STDERR, but you should probably
> double check it)
> 
> Pat
> 

Hi Pat,

Indeed, that seems to be the case (learn something new every day!)

At which point we could write all the verbose output to stderr and still
have it written to the console by default, with only the package name
written to stdout, and

# yum install $(nvidia-detect)

would only parse the package name as desired.

So at which point do we still need a terse option given that
nvidia-detect 2> /dev/null would achieve the same result?




More information about the elrepo mailing list