I run yum and analyze its output by a script. Its output currently is mostly intended for humans. --quiet suppresses some messages, but remaining ones are not changed (IOW, if they were machine-unfriendly, they stay machine-unfriendly). Example: # yum provides /bin/sleep coreutils-7.2-1.fc11.x86_64 : A set of basic GNU tools commonly used in shell scripts Repo : distro1 Matched from: Filename : /bin/sleep coreutils-7.2-4.fc11.x86_64 : A set of basic GNU tools commonly used in shell scripts Repo : updates Matched from: Filename : /bin/sleep ... ... The above is not too bad, if yum guarantees that the format is stable (e.g. that I can always find package name followed by exactly " : "). Does it? If not, then I'd prefer an option where yum uses machine-oriented and stable format. Perhaps: package: coreutils-7.2-4.fc11.x86_64 description: A set of basic GNU tools commonly used in shell scripts (^^^^ say, with newlines encoded as %0D or something) repo: updates ... Next example. # yum clean all # yum provides /bin/sleep Loaded plugins: refresh-packagekit fedora/metalink | 17 kB 00:00 fedora | 3.8 kB 00:00 fedora/primary_db 4% [==- ] 159 kB/s | 440 kB 01:04 ETA ... This is rather bad. Progress bar output is nearly impossible to parse. Ok, this can be suppressed by giving yum a non-tty stdout for output: # yum clean all # yum provides /bin/sleep | cat Loaded plugins: refresh-packagekit (nothing happens for a long time) coreutils-7.2-1.fc11.x86_64 : A set of basic GNU tools commonly used in shell : scripts Repo : distro1 Matched from: Filename : /bin/sleep .... This is better. I'd like some sort of progress report in order to pipe it to my users (otherwise users are complaining that "installation hung"), I just need it in the line-by-line update suitable for machine consumption. Something like: fedora/metalink 100% 17 kB fedora 100% 3 kB fedora/primary_db 3% 440 kB fedora/primary_db 6% 440 kB <-- new line every few seconds ... One can observe similar behavior of yumdownloader. Try: # yumdownloader coreutils-7.2-4.fc11.x86_64 and # yumdownloader coreutils-7.2-4.fc11.x86_64 | cat Is it possible to add a --machine-log option to yum and yumdownloader to improve this situation?
Seth recently created: http://skvidal.fedorapeople.org/misc/yumpipes.py ...not sure if he's planning on getting that into a package or not.
I'm debating it. It would be handy for various odd situations. I think it may end up in yum-utils.
bug 548148 is nearly impossible to close without such feature. Failure scenario: "yum --enablerepo=*debuginfo* --quiet provides /usr/lib/debug/.build-id/60/e56607981d360f5b92a876477ce224f4125529.debug ..." is stuck for 10+ minutes with no way to know why, what to do?