- Fix for handling integer options (bug #531278).

This commit is contained in:
Tim Waugh 2010-01-19 17:01:22 +00:00
parent aa8ac3c317
commit b8a26ebb49
2 changed files with 21 additions and 1 deletions

View File

@ -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;
}

View File

@ -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 <twaugh@redhat.com> - 4.0.3-8
- Fix for handling integer options (bug #531278).
* Fri Dec 4 2009 Tim Waugh <twaugh@redhat.com> - 4.0.3-7
- Fixed installation path for perl module.