From df126de8c30ed3d701abae80524d857f4d490ac6 Mon Sep 17 00:00:00 2001 From: Matěj Grabovský Date: Dec 11 2020 11:29:09 +0000 Subject: Port upstream API patch Port an addition in libreport Python API from upstream in order to hotfix interoperability with abrt. The commit in question: https://github.com/abrt/libreport/commit/cbb6b43038f0d88b28197ba905ba9324c0602945 Resolves rhbz#1906405 --- diff --git a/0009-client-python-Add-getter-for-package-count-to-downlo.patch b/0009-client-python-Add-getter-for-package-count-to-downlo.patch new file mode 100644 index 0000000..6fa6ee4 --- /dev/null +++ b/0009-client-python-Add-getter-for-package-count-to-downlo.patch @@ -0,0 +1,28 @@ +From cbb6b43038f0d88b28197ba905ba9324c0602945 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= +Date: Thu, 3 Sep 2020 15:05:23 +0200 +Subject: [PATCH] client-python: Add getter for package count to downloader + +Add a new method get_package_count() to the DebugInfoDownload class +which returns the number of packages that will be downloaded. +--- + src/client-python/reportclient/debuginfo.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/client-python/reportclient/debuginfo.py b/src/client-python/reportclient/debuginfo.py +index cb318e8a..eeb2be30 100644 +--- a/src/client-python/reportclient/debuginfo.py ++++ b/src/client-python/reportclient/debuginfo.py +@@ -242,6 +242,9 @@ class DebugInfoDownload(object): + def get_install_size(self): + return self.installed_size + ++ def get_package_count(self): ++ return len(self.package_files_dict) ++ + def mute_stdout(self): + """ + Links sys.stdout with /dev/null and saves the old stdout +-- +2.26.2 + diff --git a/libreport.spec b/libreport.spec index bfac57c..0a638e3 100644 --- a/libreport.spec +++ b/libreport.spec @@ -15,7 +15,7 @@ Summary: Generic library for reporting various problems Name: libreport Version: 2.14.0 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -28,6 +28,7 @@ Patch4: 0005-gui-wizard-gtk-Fix-segfault.patch Patch5: 0006-event_config-Null-autofree-pointers-before-returning.patch Patch6: 0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch Patch7: 0008-rhbz-Fix-a-double-free-condition.patch +Patch8: 0009-client-python-Add-getter-for-package-count-to-downlo.patch BuildRequires: %{dbus_devel} BuildRequires: gtk3-devel