- Use upstream fix for adjustment of conflicting options (bug #533426, STR

#3439).
This commit is contained in:
Tim Waugh 2009-12-08 10:07:59 +00:00
parent 7945d11fec
commit 61638776ab
2 changed files with 123 additions and 7 deletions

View File

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

View File

@ -518,6 +518,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Dec 8 2009 Tim Waugh <twaugh@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).