Re: Regarding yum download progress information

Zdenek Pavlas <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <665cbe53-4812-4dd8-a71d-299cb09f5bdf@zmail14.collab.prod.int.phx2.redhat.com>
> I'd like to get the current percentage download done information in
> some way or the other when yum is downloading to stdout or a file.
..
> Is it possible?

'yum' and 'yumdownloader' do not print progress information unless
the output is a tty, as it's not meant to be parsed.  AFAIK there's
no easy way to access the progress if stdout is redirected.

With '-d[01]' we don't report progress even on a tty.. 
Maybe we should turn the progress report on with '-d9'?

diff --git a/output.py b/output.py
index be4e4d9..991b337 100755
--- a/output.py
+++ b/output.py
@@ -1558,7 +1558,7 @@ Transaction Summary
         # if we're below 2 on the debug level we don't need to be outputting
         # progress bars - this is hacky - I'm open to other options
         # One of these is a download
-        if self.conf.debuglevel < 2 or not sys.stdout.isatty():
+        if self.conf.debuglevel < 2 or not (sys.stdout.isatty() or self.conf.debuglevel == 9):
             progressbar = None
             callback = None
         else:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.