From b8a26ebb49b217da3baf565b66121f807388d047 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 19 Jan 2010 17:01:22 +0000 Subject: [PATCH] - Fix for handling integer options (bug #531278). --- foomatic-filters-int-options.patch | 13 +++++++++++++ foomatic.spec | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 foomatic-filters-int-options.patch diff --git a/foomatic-filters-int-options.patch b/foomatic-filters-int-options.patch new file mode 100644 index 0000000..220d36c --- /dev/null +++ b/foomatic-filters-int-options.patch @@ -0,0 +1,13 @@ +diff -up foomatic-filters-4.0.3/options.c.int-options foomatic-filters-4.0.3/options.c +--- foomatic-filters-4.0.3/options.c.int-options 2009-08-19 19:08:41.000000000 +0100 ++++ foomatic-filters-4.0.3/options.c 2010-01-19 16:43:09.343981005 +0000 +@@ -863,7 +863,8 @@ int option_get_command(dstr_t *cmd, opti + + /* If the value is set to a predefined choice */ + choice = option_find_choice(opt, valstr); +- if (choice) { ++ if (choice && (*choice->command || ++ ((opt->type != TYPE_INT) && (opt->type != TYPE_FLOAT)))) { + dstrcpy(cmd, choice->command); + return 1; + } diff --git a/foomatic.spec b/foomatic.spec index 6553419..af2bd7a 100644 --- a/foomatic.spec +++ b/foomatic.spec @@ -4,7 +4,7 @@ Summary: Database of printers and printer drivers Name: foomatic Version: %{enginever} -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ Group: System Environment/Libraries @@ -20,6 +20,9 @@ Patch1: foomatic-filters-libdir.patch # Use mkstemp, not mktemp. Patch2: foomatic-mkstemp.patch +# Fix for handling integer options (bug #531278). +Patch3: foomatic-filters-int-options.patch + ## PATCHES FOR FOOMATIC-DB-ENGINE (PATCHES 101 TO 200) # Use libdir. @@ -73,6 +76,7 @@ The site http://www.linuxprinting.org/ is based on this database. pushd foomatic-filters-%{filtersver} %patch1 -p1 -b .libdir %patch2 -p1 -b .mkstemp +%patch3 -p1 -b .int-options aclocal automake autoconf @@ -160,6 +164,9 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %{_var}/cache/foomatic %changelog +* Tue Jan 19 2010 Tim Waugh - 4.0.3-8 +- Fix for handling integer options (bug #531278). + * Fri Dec 4 2009 Tim Waugh - 4.0.3-7 - Fixed installation path for perl module.