Re: Yum output and term size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pirla <the.pirla@xxxxxxx> writes:

>>  If the output is going to a non-terminal then yum can't find out how
>> big it is. So the only way to make "yum blah" and "yum blah | cat"
>> look the same is to guess at what the terminal size is.
>
> But yum can understand that is sending output to a non terminal

 No, it knows that what it is writing to isn't a terminal but it
doesn't know where the data ends up.

>>  You might be arguing that a default size of say "1000" is more often
>> correct than the current default of 80. I disagree, do you have any
>> data? You might argue that piping the output to anything means that
>> people want the output to look different ... and I would disagree very
>> strongly that people would expect that.
>
> 1000 or 80 is the same... If one need 1001.
> That should be everytime wrong.
> The right solution is to permit infinite lenght.
> Parsing output in this way is easier.
> grep, less, awk and so on ca be used to build complex scripts.

 This implies that yum output is meant for tools first and humans
second, we disagree. For instance most users would expect that given:

yum list yum
yum list yum | fgrep blah

...the second one would output the lines that the first one did which
contain the string blah. Changing the wrapping would break this.

 Again, the advise is always "if you are doing code it's much better
to just use the python API" ... we can easily keep compatibility with
that etc. so your scripts will work "forever".

-- 
James Antill -- james@xxxxxxx
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux