[PATCH] DNFPayload: display the download progress on the hub.

Vratislav Podzimek vpodzime at redhat.com
Tue Feb 25 12:21:40 UTC 2014


On Tue, 2014-02-25 at 08:55 +0100, Ales Kozumplik wrote:
> From: Ales Kozumplik <ales at redhat.com>
> 
> ---
>  anaconda.spec.in                   |  2 +-
>  pyanaconda/packaging/dnfpayload.py | 65 +++++++++++++++++++++++++++++++++++---
>  2 files changed, 62 insertions(+), 5 deletions(-)
> 
> diff --git a/anaconda.spec.in b/anaconda.spec.in
> index 7215e32..b648831 100755
> --- a/anaconda.spec.in
> +++ b/anaconda.spec.in
> @@ -23,7 +23,7 @@ Source0: %{name}-%{version}.tar.bz2
>  %define intltoolver 0.31.2-3
>  %define pykickstartver 1.99.46
>  %define yumver 3.4.3-91
> -%define dnfver 0.4.14
> +%define dnfver 0.4.15
>  %define partedver 1.8.1
>  %define pypartedver 2.5-2
>  %define pythonpyblockver 0.45
> diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
> index ecf7bb1..f11d45c 100644
> --- a/pyanaconda/packaging/dnfpayload.py
> +++ b/pyanaconda/packaging/dnfpayload.py
> @@ -25,9 +25,11 @@ from pyanaconda.flags import flags
>  from pyanaconda.i18n import _
>  from pyanaconda.progress import progressQ
>  
> +import collections
>  import itertools
>  import logging
>  import multiprocessing
> +import operator
>  import pyanaconda.constants as constants
>  import pyanaconda.errors as errors
>  import pyanaconda.iutil
> @@ -41,7 +43,7 @@ try:
>      import dnf
>      import dnf.exceptions
>      import dnf.repo
> -    import dnf.output
> +    import dnf.callback
>      import rpm
>  except ImportError as e:
>      log.error("dnfpayload: component import failed: %s", e)
> @@ -83,6 +85,16 @@ def _df_map():
>          structured[key] = Size(bytes=int(val)*1024)
>      return structured
>  
> +def _paced(fn):
> +    """Execute `fn` no more often then every 2 seconds."""
                                     ^than

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list