- No longer need str2512 patches.
This commit is contained in:
Tim Waugh 2007-09-19 11:02:14 +00:00
parent cd0088a44a
commit cfc9fc59cc
6 changed files with 962 additions and 1160 deletions

View File

@ -26,3 +26,4 @@ cups-1.3b1-source.tar.bz2
cups-1.3rc1-source.tar.bz2
cups-1.3rc2-source.tar.bz2
cups-1.3.0-source.tar.bz2
cups-1.3.2-source.tar.bz2

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
diff -up cups-1.3.1/scheduler/dirsvc.c.printcap cups-1.3.1/scheduler/dirsvc.c
--- cups-1.3.1/scheduler/dirsvc.c.printcap 2007-09-18 16:29:18.000000000 +0100
+++ cups-1.3.1/scheduler/dirsvc.c 2007-09-18 16:29:19.000000000 +0100
@@ -2134,6 +2134,7 @@ process_browse_data(
cupsdDeletePrinter(p, 1);
cupsdUpdateImplicitClasses();
+ write_printcap = 1;
}
else if (update)
{

View File

@ -1,169 +0,0 @@
diff -up cups-1.3.1/scheduler/dirsvc.c.str2512 cups-1.3.1/scheduler/dirsvc.c
--- cups-1.3.1/scheduler/dirsvc.c.str2512 2007-09-08 01:28:06.000000000 +0100
+++ cups-1.3.1/scheduler/dirsvc.c 2007-09-18 09:31:23.000000000 +0100
@@ -91,7 +91,7 @@ static void process_browse_data(const ch
ipp_pstate_t state, const char *location,
const char *info, const char *make_model,
int num_attrs, cups_option_t *attrs);
-static void process_implicit_classes(void);
+static void process_implicit_classes(int *write_printcap);
static void send_cups_browse(cupsd_printer_t *p);
#ifdef HAVE_LDAP
static void send_ldap_browse(cupsd_printer_t *p);
@@ -609,7 +609,7 @@ cupsdLoadRemoteCache(void)
* Do auto-classing if needed...
*/
- process_implicit_classes();
+ process_implicit_classes(NULL);
}
@@ -1685,7 +1685,8 @@ process_browse_data(
cups_option_t *attrs) /* I - Attributes */
{
int i; /* Looping var */
- int update; /* Update printer attributes? */
+ int update, /* Update printer attributes? */
+ write_printcap; /* Write the printcap file? */
char finaluri[HTTP_MAX_URI], /* Final URI for printer */
name[IPP_MAX_NAME], /* Name of printer */
newname[IPP_MAX_NAME], /* New name of printer */
@@ -1772,11 +1773,12 @@ process_browse_data(
* See if we already have it listed in the Printers list, and add it if not...
*/
- type |= CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED;
- type &= ~CUPS_PRINTER_IMPLICIT;
- update = 0;
- hptr = strchr(host, '.');
- sptr = strchr(ServerName, '.');
+ type |= CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED;
+ type &= ~CUPS_PRINTER_IMPLICIT;
+ update = 0;
+ write_printcap = 0;
+ hptr = strchr(host, '.');
+ sptr = strchr(ServerName, '.');
if (!ServerNameIsIP && sptr != NULL && hptr != NULL)
{
@@ -1899,7 +1901,8 @@ process_browse_data(
cupsdSetString(&p->device_uri, uri);
cupsdSetString(&p->hostname, host);
- update = 1;
+ update = 1;
+ write_printcap = 1;
}
}
else
@@ -2005,7 +2008,8 @@ process_browse_data(
cupsdSetString(&p->uri, uri);
cupsdSetString(&p->device_uri, uri);
- update = 1;
+ write_printcap = 1;
+ update = 1;
}
}
@@ -2064,7 +2068,8 @@ process_browse_data(
if (info && (!p->info || strcmp(p->info, info)))
{
cupsdSetString(&p->info, info);
- update = 1;
+ update = 1;
+ write_printcap = 1;
}
if (!make_model || !make_model[0])
@@ -2153,6 +2158,7 @@ process_browse_data(
if (p->type & CUPS_PRINTER_DEFAULT)
{
DefaultPrinter = p;
+ write_printcap = 1;
break;
}
}
@@ -2161,13 +2167,14 @@ process_browse_data(
* Do auto-classing if needed...
*/
- process_implicit_classes();
+ process_implicit_classes(&write_printcap);
/*
* Update the printcap file...
*/
- cupsdWritePrintcap();
+ if (write_printcap)
+ cupsdWritePrintcap();
}
@@ -2657,7 +2664,8 @@ dnssdRegisterPrinter(cupsd_printer_t *p)
*/
static void
-process_implicit_classes(void)
+process_implicit_classes(
+ int *write_printcap) /* O - Write printcap file? */
{
int i; /* Looping var */
int update; /* Update printer attributes? */
@@ -2738,6 +2746,9 @@ process_implicit_classes(void)
update = 1;
+ if (write_printcap)
+ *write_printcap = 1;
+
cupsdLogMessage(CUPSD_LOG_DEBUG, "Added implicit class \"%s\"...",
name);
cupsdAddEvent(CUPSD_EVENT_PRINTER_ADDED, p, NULL,
diff -up cups-1.3.1/scheduler/printers.c.str2512 cups-1.3.1/scheduler/printers.c
--- cups-1.3.1/scheduler/printers.c.str2512 2007-09-17 17:06:26.000000000 +0100
+++ cups-1.3.1/scheduler/printers.c 2007-09-18 09:31:23.000000000 +0100
@@ -3045,7 +3045,8 @@ cupsdWritePrintcap(void)
* data has come from...
*/
- cupsFilePuts(fp, "# This file was automatically generated by cupsd(8) from the\n");
+ cupsFilePuts(fp,
+ "# This file was automatically generated by cupsd(8) from the\n");
cupsFilePrintf(fp, "# %s/printers.conf file. All changes to this file\n",
ServerRoot);
cupsFilePuts(fp, "# will be lost.\n");
@@ -3071,14 +3072,15 @@ cupsdWritePrintcap(void)
if (DefaultPrinter)
cupsFilePrintf(fp, "%s|%s:rm=%s:rp=%s:\n", DefaultPrinter->name,
- DefaultPrinter->info, ServerName, DefaultPrinter->name);
+ DefaultPrinter->info, ServerName,
+ DefaultPrinter->name);
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
if (p != DefaultPrinter)
cupsFilePrintf(fp, "%s|%s:rm=%s:rp=%s:\n", p->name, p->info,
- ServerName, p->name);
+ ServerName, p->name);
break;
case PRINTCAP_SOLARIS:
@@ -3116,9 +3118,10 @@ cupsdWritePrintcap(void)
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
cupsFilePrintf(fp, "%s:\\\n"
- "\t:bsdaddr=%s,%s:\\\n"
- "\t:description=%s:\n",
- p->name, ServerName, p->name, p->info ? p->info : "");
+ "\t:bsdaddr=%s,%s:\\\n"
+ "\t:description=%s:\n",
+ p->name, ServerName, p->name,
+ p->info ? p->info : "");
break;
}
}

View File

@ -5,8 +5,8 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.3.1
Release: 3%{?dist}
Version: 1.3.2
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}-source.tar.bz2
@ -37,9 +37,7 @@ Patch11: cups-paps.patch
Patch12: cups-wbuffer.patch
Patch13: cups-direct-usb.patch
Patch14: cups-lpr-help.patch
Patch15: cups-str2512.patch
Patch16: cups-pid.patch
Patch17: cups-str2512-printcap.patch
Patch19: cups-eggcups.patch
Patch20: cups-getpass.patch
Patch21: cups-driverd-timeout.patch
@ -148,9 +146,7 @@ lpd emulation.
%patch12 -p1 -b .wbuffer
%patch13 -p1 -b .direct-usb
%patch14 -p1 -b .lpr-help
%patch15 -p1 -b .str2512
%patch16 -p1 -b .pid
%patch17 -p1 -b .str2512-printcap
%patch19 -p1 -b .eggcups
%patch20 -p1 -b .getpass
%patch21 -p1 -b .driverd-timeout
@ -443,6 +439,10 @@ rm -rf $RPM_BUILD_ROOT
%{cups_serverbin}/daemon/cups-lpd
%changelog
* Wed Sep 19 2007 Tim Waugh <twaugh@redhat.com> 1:1.3.2-1
- 1.3.2.
- No longer need str2512 patches.
* Tue Sep 18 2007 Tim Waugh <twaugh@redhat.com> 1:1.3.1-3
- Write printcap when a remote queue is deleted (bug #290831).

View File

@ -1,2 +1,2 @@
b0bb017098e8e76b8a25e666c41ce540 postscript.ppd.gz
89ec473d48598cde9b2030743b15448b cups-1.3.1-source.tar.bz2
0f5f95847d7ca209da25936e47699bfe cups-1.3.2-source.tar.bz2