rpms/cups/devel cups-str3439.patch,1.1,1.2 cups.spec,1.551,1.552
Tim Waugh
twaugh at fedoraproject.org
Tue Dec 8 10:07:59 UTC 2009
Author: twaugh
Update of /cvs/pkgs/rpms/cups/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv608
Modified Files:
cups-str3439.patch cups.spec
Log Message:
* Tue Dec 8 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-14
- Use upstream fix for adjustment of conflicting options
(bug #533426, STR #3439).
cups-str3439.patch:
cgi-bin/admin.c | 5 +++++
cups/conflicts.c | 4 ++++
cups/mark.c | 24 +++++++++++++++++++++++-
3 files changed, 32 insertions(+), 1 deletion(-)
Index: cups-str3439.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-str3439.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- cups-str3439.patch 4 Dec 2009 15:51:35 -0000 1.1
+++ cups-str3439.patch 8 Dec 2009 10:07:59 -0000 1.2
@@ -1,12 +1,126 @@
diff -up cups-1.4.2/cgi-bin/admin.c.str3439 cups-1.4.2/cgi-bin/admin.c
---- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-04 15:48:21.181907084 +0000
-+++ cups-1.4.2/cgi-bin/admin.c 2009-12-04 15:48:21.199906005 +0000
-@@ -3327,7 +3327,7 @@ do_set_options(http_t *http, /* I - HTT
+--- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-08 10:03:36.412157983 +0000
++++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:03:41.659157246 +0000
+@@ -3320,11 +3320,16 @@ do_set_options(http_t *http, /* I - HTT
+ for (option = ppdFirstOption(ppd);
+ option;
+ option = ppdNextOption(ppd))
++ {
+ if ((var = cgiGetVariable(option->keyword)) != NULL)
+ {
+ have_options = 1;
+ ppdMarkOption(ppd, option->keyword, var);
++ fprintf(stderr, "DEBUG: Set %s to %s...\n", option->keyword, var);
}
++ else
++ fprintf(stderr, "DEBUG: Didn't find %s...\n", option->keyword);
++ }
}
-- if (!have_options || ppdConflicts(ppd))
-+ if (!have_options)
+ if (!have_options || ppdConflicts(ppd))
+diff -up cups-1.4.2/cups/conflicts.c.str3439 cups-1.4.2/cups/conflicts.c
+--- cups-1.4.2/cups/conflicts.c.str3439 2009-05-18 23:55:15.000000000 +0100
++++ cups-1.4.2/cups/conflicts.c 2009-12-08 10:03:41.657157719 +0000
+@@ -583,9 +583,13 @@ ppdConflicts(ppd_file_t *ppd) /* I - PP
+ * Clear all conflicts...
+ */
+
++ cupsArraySave(ppd->options);
++
+ for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd))
+ o->conflicted = 0;
+
++ cupsArrayRestore(ppd->options);
++
+ /*
+ * Test for conflicts...
+ */
+diff -up cups-1.4.2/cups/mark.c.str3439 cups-1.4.2/cups/mark.c
+--- cups-1.4.2/cups/mark.c.str3439 2009-04-20 22:37:14.000000000 +0100
++++ cups-1.4.2/cups/mark.c 2009-12-08 10:03:41.656157620 +0000
+@@ -842,6 +842,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+
+ if (!strcasecmp(option, "AP_D_InputSlot"))
{
- /*
- * Show the options to the user...
++ cupsArraySave(ppd->options);
++
+ if ((o = ppdFindOption(ppd, "InputSlot")) != NULL)
+ {
+ key.option = o;
+@@ -851,13 +853,21 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ cupsArrayRemove(ppd->marked, oldc);
+ }
+ }
++
++ cupsArrayRestore(ppd->options);
+ }
+
+ /*
+ * Check for custom options...
+ */
+
+- if ((o = ppdFindOption(ppd, option)) == NULL)
++ cupsArraySave(ppd->options);
++
++ o = ppdFindOption(ppd, option);
++
++ cupsArrayRestore(ppd->options);
++
++ if (!o)
+ return;
+
+ loc = localeconv();
+@@ -1060,6 +1070,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ * appropriate...
+ */
+
++ cupsArraySave(ppd->options);
++
+ if (!strcasecmp(option, "PageSize"))
+ {
+ if ((o = ppdFindOption(ppd, "PageRegion")) != NULL)
+@@ -1084,6 +1096,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ }
+ }
+ }
++
++ cupsArrayRestore(ppd->options);
+ }
+ else if (!strcasecmp(option, "InputSlot"))
+ {
+@@ -1091,6 +1105,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ * Unmark ManualFeed option...
+ */
+
++ cupsArraySave(ppd->options);
++
+ if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL)
+ {
+ key.option = o;
+@@ -1100,6 +1116,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ cupsArrayRemove(ppd->marked, oldc);
+ }
+ }
++
++ cupsArrayRestore(ppd->options);
+ }
+ else if (!strcasecmp(option, "ManualFeed") &&
+ !strcasecmp(choice, "True"))
+@@ -1108,6 +1126,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ * Unmark InputSlot option...
+ */
+
++ cupsArraySave(ppd->options);
++
+ if ((o = ppdFindOption(ppd, "InputSlot")) != NULL)
+ {
+ key.option = o;
+@@ -1117,6 +1137,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
+ cupsArrayRemove(ppd->marked, oldc);
+ }
+ }
++
++ cupsArrayRestore(ppd->options);
+ }
+ }
+
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.551
retrieving revision 1.552
diff -u -p -r1.551 -r1.552
--- cups.spec 8 Dec 2009 09:57:29 -0000 1.551
+++ cups.spec 8 Dec 2009 10:07:59 -0000 1.552
@@ -518,6 +518,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Dec 8 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-14
+- Use upstream fix for adjustment of conflicting options
+ (bug #533426, STR #3439).
- No longer requires paps. The texttopaps filter MIME conversion file
is now provided by the paps package (bug #545036).
- Moved %%{_datadir}/cups/ppdc/*.h to the main package (bug #545348).
More information about the fedora-extras-commits
mailing list