1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
fix pillow version check
This commit is contained in:
parent
ed50eac680
commit
9ac914b020
18
hplip-pil.patch
Normal file
18
hplip-pil.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
diff --git a/installer/dcheck.py b/installer/dcheck.py
|
||||||
|
index 3d0624e..1817819 100644
|
||||||
|
--- a/installer/dcheck.py
|
||||||
|
+++ b/installer/dcheck.py
|
||||||
|
@@ -366,11 +366,11 @@ def get_xsane_version():
|
||||||
|
|
||||||
|
def get_pil_version():
|
||||||
|
try:
|
||||||
|
- from PIL import Image
|
||||||
|
+ import PIL
|
||||||
|
except ImportError:
|
||||||
|
return '-'
|
||||||
|
else:
|
||||||
|
- return Image.PILLOW_VERSION
|
||||||
|
+ return PIL.__version__
|
||||||
|
|
||||||
|
def get_libpthread_version():
|
||||||
|
try:
|
18
hplip-unicodeerror.patch
Normal file
18
hplip-unicodeerror.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
diff --git a/base/sixext.py b/base/sixext.py
|
||||||
|
index 0bf4fc4..311bf72 100644
|
||||||
|
--- a/base/sixext.py
|
||||||
|
+++ b/base/sixext.py
|
||||||
|
@@ -110,11 +110,11 @@ if PY3:
|
||||||
|
|
||||||
|
|
||||||
|
def to_string_utf8(s):
|
||||||
|
- return s.decode("utf-8")
|
||||||
|
+ return s.decode("utf-8", 'ignore')
|
||||||
|
|
||||||
|
|
||||||
|
def to_string_latin(s):
|
||||||
|
- return s.decode("latin-1")
|
||||||
|
+ return s.decode("latin-1", 'ignore')
|
||||||
|
|
||||||
|
|
||||||
|
def to_unicode(s, enc=None):
|
15
hplip.spec
15
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.12
|
Version: 3.19.12
|
||||||
Release: 3%{?dist}
|
Release: 4%{?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
|
||||||
@ -123,6 +123,12 @@ Patch48: hplip-missing-drivers.patch
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1772698
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1772698
|
||||||
# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
|
# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
|
||||||
Patch49: hplip-missing-laserjet2200.patch
|
Patch49: hplip-missing-laserjet2200.patch
|
||||||
|
# sixext has problems with python3 strings (bz#1573430)
|
||||||
|
# reported https://bugs.launchpad.net/bugs/1480152
|
||||||
|
Patch50: hplip-unicodeerror.patch
|
||||||
|
# the version attribute in python-pillow got changed again..
|
||||||
|
# https://bugs.launchpad.net/hplip/+bug/1863620
|
||||||
|
Patch51: hplip-pil.patch
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
@ -381,6 +387,9 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
|
|||||||
%patch48 -p1 -b .missing-drivers
|
%patch48 -p1 -b .missing-drivers
|
||||||
# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
|
# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
|
||||||
%patch49 -p1 -b .missing-laserjet-2200
|
%patch49 -p1 -b .missing-laserjet-2200
|
||||||
|
# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
|
||||||
|
%patch50 -p1 -b .unicodeerror
|
||||||
|
%patch51 -p1 -b .pil
|
||||||
|
|
||||||
sed -i.duplex-constraints \
|
sed -i.duplex-constraints \
|
||||||
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
||||||
@ -687,6 +696,10 @@ 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
|
||||||
|
* Mon Feb 17 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.19.12-4
|
||||||
|
- 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
|
||||||
|
- fix pillow version check
|
||||||
|
|
||||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.12-3
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.12-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user