Fix for PPD update script with more than one PPD (bug #1229619).

This commit is contained in:
Tim Waugh 2015-06-29 17:30:01 +01:00
parent 7b6d0a3a4e
commit 7bd66d98df
2 changed files with 14 additions and 4 deletions

View File

@ -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:

View File

@ -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 <twaugh@redhat.com> - 5.2.10-12
- Fix for PPD update script with more than one PPD (bug #1229619).
* Mon Jun 01 2015 Jiri Popelka <jpopelka@redhat.com> - 5.2.10-11
- foomatic subpackage requires python3-cups (bug #1226871).