1745317 - hp-plugin is broken on Rawhide
This commit is contained in:
parent
a86dc8a8fe
commit
e4254ee67e
58
hplip-dist-removed.patch
Normal file
58
hplip-dist-removed.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
diff --git a/base/password.py b/base/password.py
|
||||||
|
index 45c6641..9e573c3 100644
|
||||||
|
--- a/base/password.py
|
||||||
|
+++ b/base/password.py
|
||||||
|
@@ -78,10 +78,15 @@ def get_distro_name():
|
||||||
|
os_name = None
|
||||||
|
try:
|
||||||
|
import platform
|
||||||
|
- os_name = platform.dist()[0]
|
||||||
|
except ImportError:
|
||||||
|
os_name = None
|
||||||
|
|
||||||
|
+ try:
|
||||||
|
+ os_name = platform.dist()[0]
|
||||||
|
+ except AttributeError:
|
||||||
|
+ import distro
|
||||||
|
+ os_name = distro.linux_distribution()[0]
|
||||||
|
+
|
||||||
|
if not os_name:
|
||||||
|
name = os.popen('lsb_release -i | cut -f 2')
|
||||||
|
os_name = name.read().strip()
|
||||||
|
@@ -139,8 +144,12 @@ class Password(object):
|
||||||
|
try:
|
||||||
|
self.__authType = AUTH_TYPES[distro_name]
|
||||||
|
if distro_name == 'fedora':
|
||||||
|
- import platform
|
||||||
|
- ver = int(platform.dist()[1])
|
||||||
|
+ import platform
|
||||||
|
+ try:
|
||||||
|
+ ver = int(platform.dist()[1])
|
||||||
|
+ except AttributeError:
|
||||||
|
+ import distro
|
||||||
|
+ ver = int(distro.linux_distribution()[1])
|
||||||
|
if ver >= 28:
|
||||||
|
self.__authType = AUTH_TYPES['fedora28']
|
||||||
|
except KeyError:
|
||||||
|
diff --git a/installer/core_install.py b/installer/core_install.py
|
||||||
|
index 9a3b5ac..af1348d 100644
|
||||||
|
--- a/installer/core_install.py
|
||||||
|
+++ b/installer/core_install.py
|
||||||
|
@@ -640,8 +640,15 @@ class CoreInstall(object):
|
||||||
|
# Getting distro information using platform module
|
||||||
|
try:
|
||||||
|
import platform
|
||||||
|
- name = platform.dist()[0].lower()
|
||||||
|
- ver = platform.dist()[1]
|
||||||
|
+ try:
|
||||||
|
+ name = platform.dist()[0].lower()
|
||||||
|
+ ver = platform.dist()[1]
|
||||||
|
+ except AttributeError:
|
||||||
|
+ import distro
|
||||||
|
+
|
||||||
|
+ name = distro.linux_distribution()[0].lower()
|
||||||
|
+ ver = distro.linux_distribution()[1]
|
||||||
|
+
|
||||||
|
if not name:
|
||||||
|
found = False
|
||||||
|
log.debug("Not able to detect distro")
|
11
hplip.spec
11
hplip.spec
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.19.6
|
Version: 3.19.6
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
||||||
|
|
||||||
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -114,6 +114,10 @@ Patch49: hplip-logging-segfault.patch
|
|||||||
# wanted to report upstream, but launchpad ends with timeout error
|
# wanted to report upstream, but launchpad ends with timeout error
|
||||||
# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1738321
|
# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1738321
|
||||||
Patch50: hplip-systray-blockerror.patch
|
Patch50: hplip-systray-blockerror.patch
|
||||||
|
# platform module removed dist methode, using distro instead of it
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1745317
|
||||||
|
# reported upstream https://bugs.launchpad.net/hplip/+bug/1843037
|
||||||
|
Patch51: hplip-dist-removed.patch
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
@ -366,6 +370,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
|
|||||||
%patch49 -p1 -b .logging-segfault
|
%patch49 -p1 -b .logging-segfault
|
||||||
# 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable
|
# 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable
|
||||||
%patch50 -p1 -b .systray-blockerror
|
%patch50 -p1 -b .systray-blockerror
|
||||||
|
# 1745317 - hp-plugin is broken on Rawhide
|
||||||
|
%patch51 -p1 -b .dist-removed
|
||||||
|
|
||||||
sed -i.duplex-constraints \
|
sed -i.duplex-constraints \
|
||||||
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
||||||
@ -670,6 +676,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 06 2019 Zdenek Dohnal <zdohnal@redhat.com> - 3.19.6-7
|
||||||
|
- 1745317 - hp-plugin is broken on Rawhide
|
||||||
|
|
||||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.19.6-6
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.19.6-6
|
||||||
- Rebuilt for Python 3.8
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user