From 2b3aaf0b10e24e4ade0a097d955dff4c7c995116 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 1 Dec 2014 12:29:50 +0000 Subject: [PATCH] Fix for upstream bug #1238 (bug #1163731). Resolves: rhbz#1163731 --- foomatic-upstream1238.patch | 17 +++++++++++++++++ foomatic.spec | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 foomatic-upstream1238.patch diff --git a/foomatic-upstream1238.patch b/foomatic-upstream1238.patch new file mode 100644 index 0000000..3d5959c --- /dev/null +++ b/foomatic-upstream1238.patch @@ -0,0 +1,17 @@ +diff -U0 foomatic-db-engine-4.0.11/ChangeLog.upstream1238 foomatic-db-engine-4.0.11/ChangeLog +diff -up foomatic-db-engine-4.0.11/foomatic-ppdfile.in.upstream1238 foomatic-db-engine-4.0.11/foomatic-ppdfile.in +--- foomatic-db-engine-4.0.11/foomatic-ppdfile.in.upstream1238 2014-03-20 15:20:06.000000000 +0000 ++++ foomatic-db-engine-4.0.11/foomatic-ppdfile.in 2014-12-01 12:28:18.866470793 +0000 +@@ -195,8 +195,10 @@ sub generateppd { + unshift(@drivercomponents, pop(@poidcomponents)); + $driver = join('-', @drivercomponents); + $printer = join('-', @poidcomponents); +- next if (!Foomatic::DB::member($driver, @drivers) or +- !Foomatic::DB::member($printer, @printers)); ++ my @driver_printers = $db->get_printers_for_driver ($driver); ++ next if ((!Foomatic::DB::member($driver, @drivers) or ++ !Foomatic::DB::member($printer, @printers)) and ++ !Foomatic::DB::member($printer, @driver_printers)); + $poid = $printer; + last; + } diff --git a/foomatic.spec b/foomatic.spec index d70ad30..a6c01c8 100644 --- a/foomatic.spec +++ b/foomatic.spec @@ -1,7 +1,7 @@ Summary: Tools for using the foomatic database of printers and printer drivers Name: foomatic Version: 4.0.11 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ # printer-filters package has gone (bug #967316, bug #1035450). @@ -13,6 +13,7 @@ Source0: http://www.openprinting.org/download/foomatic/foomatic-db-engine-%{vers ## PATCHES FOR FOOMATIC-DB-ENGINE (PATCHES 101 TO 200) Patch101: foomatic-manpages.patch +Patch102: foomatic-upstream1238.patch ## PATCHES FOR FOOMATIC-DB-HPIJS (PATCHES 201 TO 300) @@ -63,6 +64,9 @@ The site http://www.linuxprinting.org/ is based on this database. # Ship more manpages. %patch101 -p1 -b .manpages +# Fix for upstream bug #1238 (bug #1163731). +%patch102 -p1 -b .upstream1238 + chmod a+x mkinstalldirs %build @@ -138,6 +142,9 @@ exit 0 %{_var}/cache/foomatic %changelog +* Mon Dec 1 2014 Tim Waugh - 4.0.11-6 +- Fix for upstream bug #1238 (bug #1163731). + * Thu Aug 28 2014 Tim Waugh - 4.0.11-5 - Put some text into foomatic-preferred-drivers man page.