hp-setup fails on fax setup - use binary strings
This commit is contained in:
parent
d8ec518128
commit
9dd4add413
25
hplip-use-binary-str.patch
Normal file
25
hplip-use-binary-str.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff -up hplip-3.18.5/fax/pmlfax.py.use-binary-str hplip-3.18.5/fax/pmlfax.py
|
||||||
|
--- hplip-3.18.5/fax/pmlfax.py.use-binary-str 2018-05-25 09:33:11.839375105 +0200
|
||||||
|
+++ hplip-3.18.5/fax/pmlfax.py 2018-05-25 09:50:54.131762944 +0200
|
||||||
|
@@ -143,8 +143,8 @@ class PMLFaxDevice(FaxDevice):
|
||||||
|
|
||||||
|
def getPhoneNum(self):
|
||||||
|
if PY3:
|
||||||
|
- data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
|
||||||
|
- return data
|
||||||
|
+ data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1].encode('utf-8'))
|
||||||
|
+ return data.decode('utf-8')
|
||||||
|
else:
|
||||||
|
return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
|
||||||
|
phone_num = property(getPhoneNum, setPhoneNum, doc="OID_FAX_LOCAL_PHONE_NUM")
|
||||||
|
@@ -155,8 +155,8 @@ class PMLFaxDevice(FaxDevice):
|
||||||
|
|
||||||
|
def getStationName(self):
|
||||||
|
if PY3:
|
||||||
|
- data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
|
||||||
|
- return data
|
||||||
|
+ data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1].encode('utf-8'))
|
||||||
|
+ return data.decode('utf-8')
|
||||||
|
else:
|
||||||
|
return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
|
||||||
|
|
12
hplip.spec
12
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.18.5
|
Version: 3.18.5
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD
|
License: GPLv2+ and MIT and BSD
|
||||||
|
|
||||||
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -42,6 +42,11 @@ Patch25: hplip-noernie.patch
|
|||||||
Patch26: hplip-appdata.patch
|
Patch26: hplip-appdata.patch
|
||||||
Patch27: hplip-check-cups.patch
|
Patch27: hplip-check-cups.patch
|
||||||
Patch30: hplip-typo.patch
|
Patch30: hplip-typo.patch
|
||||||
|
# python3 - recent HP release removed encoding/decoding to utf-8 in fax/pmlfax.py -
|
||||||
|
# that results in text string going into translate function in base/utils.py, which
|
||||||
|
# expects binary string because of parameters. Remove this patch if base/utils.py
|
||||||
|
# code gets fixed.
|
||||||
|
Patch31: hplip-use-binary-str.patch
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
@ -242,6 +247,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
|
|||||||
# hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869)
|
# hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869)
|
||||||
%patch30 -p1 -b .typo
|
%patch30 -p1 -b .typo
|
||||||
|
|
||||||
|
%patch31 -p1 -b .use-binary-str
|
||||||
|
|
||||||
sed -i.duplex-constraints \
|
sed -i.duplex-constraints \
|
||||||
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
||||||
prnt/drv/hpcups.drv.in
|
prnt/drv/hpcups.drv.in
|
||||||
@ -521,6 +528,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 25 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.5-2
|
||||||
|
- hp-setup fails on fax setup - use binary strings
|
||||||
|
|
||||||
* Thu May 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.5-1
|
* Thu May 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.5-1
|
||||||
- 3.18.5
|
- 3.18.5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user