diff --git a/0001-Fix-libtaskotron-when-used-with-progressbar2.patch b/0001-Fix-libtaskotron-when-used-with-progressbar2.patch new file mode 100644 index 0000000..468c03b --- /dev/null +++ b/0001-Fix-libtaskotron-when-used-with-progressbar2.patch @@ -0,0 +1,38 @@ +From 3c497cb48c647e935ce598d3f26643fed9d0b47e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= +Date: Sun, 23 Dec 2018 00:15:04 +0100 +Subject: [PATCH] Fix libtaskotron when used with progressbar2 + +Replace dropped max_val with max_value +--- + libtaskotron/file_utils.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libtaskotron/file_utils.py b/libtaskotron/file_utils.py +index 7f9ea00..2449f91 100644 +--- a/libtaskotron/file_utils.py ++++ b/libtaskotron/file_utils.py +@@ -185,7 +185,7 @@ def _download(url, dest, timeout=REQUESTS_TIMEOUT, chunk_size=REQUESTS_CHUNK_SIZ + else: + widgets = [progressbar.Percentage(), progressbar.Bar(), progressbar.ETA(), + progressbar.FileTransferSpeed()] +- pbar = progressbar.ProgressBar(widgets=widgets, maxval=int(total_len)).start() ++ pbar = progressbar.ProgressBar(widgets=widgets, max_value=int(total_len)).start() + + read = 0 + for chunk in r.iter_content(chunk_size): +@@ -195,9 +195,9 @@ def _download(url, dest, timeout=REQUESTS_TIMEOUT, chunk_size=REQUESTS_CHUNK_SIZ + # chunk can be smaller than chunk_size (end of file) or larger than it (content + # decompression) + read += min(len(chunk), chunk_size) +- # don't exceed pbar.maxval, which can happen due to content decompression (see ++ # don't exceed pbar.max_value, which can happen due to content decompression (see + # T755). This should not occur except for the last chunk. +- pbar.update(min(read, pbar.maxval)) ++ pbar.update(min(read, pbar.max_value)) + + + # http://stackoverflow.com/questions/11325019 +-- +2.20.1 + diff --git a/libtaskotron.spec b/libtaskotron.spec index 69e0d60..15a8e1d 100644 --- a/libtaskotron.spec +++ b/libtaskotron.spec @@ -1,12 +1,13 @@ Name: libtaskotron # NOTE: if you update version, *make sure* to also update `libtaskotron/__init__.py` Version: 0.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Taskotron Support Library License: GPLv3 URL: https://pagure.io/taskotron/libtaskotron Source0: https://qa.fedoraproject.org/releases/%{name}/%{name}-%{version}.tar.gz +Patch0: 0001-Fix-libtaskotron-when-used-with-progressbar2.patch BuildArch: noarch @@ -272,6 +273,9 @@ cp -a data/* %{buildroot}%{_datarootdir}/libtaskotron %license LICENSE %changelog +* Sun Dec 23 2018 Frantisek Zatloukal - 0.9.4-2 +- Support python3-progressbar2 (hotfix, rawhide dist-git only) + * Tue Dec 04 2018 Kamil Páral - 0.9.4-1 - revert to old bodhi library - fix group creation during rpm install