From 7bd66d98df0d4922ceae4176afd0007a9b688adf Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Jun 29 2015 16:30:01 +0000 Subject: Fix for PPD update script with more than one PPD (bug #1229619). --- diff --git a/cups-genppdupdate.py.in b/cups-genppdupdate.py.in index 513eddf..d65e618 100755 --- a/cups-genppdupdate.py.in +++ b/cups-genppdupdate.py.in @@ -388,13 +388,17 @@ def update_ppd (ppd_source_filename): inp = input ("Update PPD %s from %s [nyq]? " % ppd_source_filename) inp = inp.lower () if inp.startswith ("q"): - if not server_multicat: + if server_multicat: + source_fd.detach () + else: source_fd.close () print ("Skipping all...") return -2 elif not inp.startswith ("y"): - if not server_multicat: + if server_multicat: + source_fd.detach () + else: source_fd.close () print ("Skipping...") @@ -410,7 +414,9 @@ def update_ppd (ppd_source_filename): # Close original and temporary files... orig.close () - if not server_multicat: + if server_multicat: + source_fd.detach () + else: source_fd.close () orig_default_types = odt @@ -780,6 +786,7 @@ def get_ppd_fh (ppd_source_filename, filename, driver, locale, region): mc_in = io.TextIOWrapper (server_multicat_initialized.stdin) print ("%s" % url, file=mc_in) mc_in.flush () + mc_in.detach () return (new_ppd_filename, io.TextIOWrapper (server_multicat_initialized.stdout)) except OSError: diff --git a/gutenprint.spec b/gutenprint.spec index cc5ac96..4992303 100644 --- a/gutenprint.spec +++ b/gutenprint.spec @@ -3,7 +3,7 @@ Name: gutenprint Summary: Printer Drivers Package Version: 5.2.10 -Release: 11%{?dist} +Release: 12%{?dist} URL: http://gimp-print.sourceforge.net/ Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2 # Post-install script to update foomatic PPDs. @@ -282,6 +282,9 @@ fi /bin/rm -f /var/cache/foomatic/* %changelog +* Mon Jun 29 2015 Tim Waugh - 5.2.10-12 +- Fix for PPD update script with more than one PPD (bug #1229619). + * Mon Jun 01 2015 Jiri Popelka - 5.2.10-11 - foomatic subpackage requires python3-cups (bug #1226871).