From 0cef7ab4d998789723bd51764da2649764b0161a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 16 Mar 2015 16:52:07 +0000 Subject: [PATCH] Ignore IOError when logging output (bug #712537). Resolves: rhbz#712537 (cherry picked from commit 35446f4accc8bb5101c691080a101b523b1c0c15) (cherry picked from commit fbe0557bb5dd5658b00c788256a5bccb8b7c8ea3) --- hplip-silence-ioerror.patch | 12 ++++++++++++ hplip.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 hplip-silence-ioerror.patch diff --git a/hplip-silence-ioerror.patch b/hplip-silence-ioerror.patch new file mode 100644 index 0000000..07fcb7a --- /dev/null +++ b/hplip-silence-ioerror.patch @@ -0,0 +1,12 @@ +diff -up hplip-3.14.10/base/logger.py.silence-ioerror hplip-3.14.10/base/logger.py +--- hplip-3.14.10/base/logger.py.silence-ioerror 2015-06-19 11:47:49.461665593 +0100 ++++ hplip-3.14.10/base/logger.py 2015-06-19 11:48:21.691953291 +0100 +@@ -195,6 +195,8 @@ class Logger(object): + out.write('\n') + + out.flush() ++ except IOError: ++ pass + finally: + self._lock.release() + diff --git a/hplip.spec b/hplip.spec index b4ee381..0605d08 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.14.10 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT Url: http://hplip.sourceforge.net/ @@ -36,6 +36,7 @@ Patch19: hplip-avahi-parsing.patch Patch20: hplip-reportlab.patch Patch21: hplip-device_open.patch Patch22: hplip-strncpy.patch +Patch23: hplip-silence-ioerror.patch %global hpijs_epoch 1 Requires: hpijs%{?_isa} = %{hpijs_epoch}:%{version}-%{release} @@ -263,6 +264,9 @@ done # Fixed uses of strncpy throughout. %patch22 -p1 -b .strncpy +# Ignore IOError when logging output (bug #712537). +%patch23 -p1 -b .silence-ioerror + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -499,6 +503,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %postun libs -p /sbin/ldconfig %changelog +* Mon Mar 16 2015 Tim Waugh - 3.14.10-5 +- Ignore IOError when logging output (bug #712537). + * Wed Jan 21 2015 Tim Waugh - 3.14.10-4 - Fixed uses of strncpy throughout.