[Yum-devel] [PATCH] Don't fetch group_gz twice

James Antill james.antill at redhat.com
Tue Aug 28 14:30:29 UTC 2012


On Tue, 2012-08-28 at 04:31 -0400, Zdenek Pavlas wrote:
> >  ACK. I think we need similar changes to reposync, although it
> >  doesn't look like that's ever had any group_gz updates.
> 
> reposync --download-metadata downloads everything but
> ['primary', 'primary_db', 'filelists', 'filelists_db', 'other', 'other_db']
> so both group and group_gz is downloaded.  That's probably fine.
> 
> But I've noticed the multi-progress in reposync is broken, as it does not use
> YumUtilBase.  This could be fixed in reposync, but that will break with old Yum:
> 
> commit 13bf66cac22040df842b0b2f27dcf36e12e906b9
> Author: Zdeněk Pavlas <zpavlas at redhat.com>
> Date:   Tue Aug 28 09:21:51 2012 +0200
> 
>     Initialize multi progress bar
>     
>     Contrary to yumdownloader, reposync does not use YumUtilBase.
>     This needs recent Yum to work.
> 
> diff --git a/reposync.py b/reposync.py
> index ad4e441..f868594 100755
> --- a/reposync.py
> +++ b/reposync.py
> @@ -47,7 +47,7 @@ from yum.constants import *
>  from yum.packageSack import ListPackageSack
>  import rpmUtils.arch
>  import logging
> -from urlgrabber.progress import TextMeter
> +from urlgrabber.progress import TextMeter, TextMultiFileMeter
>  import urlgrabber
>  
>  # for yum 2.4.X compat
> @@ -165,7 +165,7 @@ def main():
>      #  Use progress bar display when downloading repo metadata
>      # and package files ... needs to be setup before .repos (ie. RHN/etc.).
>      if not opts.quiet:
> -        my.repos.setProgressBar(TextMeter(fo=sys.stdout))
> +        my.repos.setProgressBar(TextMeter(fo=sys.stdout), TextMultiFileMeter(fo=sys.stdout))
>      my.doRepoSetup()
>  
>      if len(opts.repoid) > 0:
> 
> An alternative is to add a hack to Yum, to turn TextMeter to TextMultiFileMeter 
> automatically.  Can't tell what's better (read: less bad)..

 I'd probably go with the above. But ACK to either/both.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20120828/7ffccd7c/attachment.asc>


More information about the Yum-devel mailing list