[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#460094: marked as done (cupsys: No option to change default error policy [patch])



Your message dated Wed, 16 Jan 2008 10:11:17 +0100
with message-id <20080116091117.GC6249@piware.de>
and subject line [Pkg-cups-devel] Bug#460094: cupsys: No option to change default error policy [patch]
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: cupsys
Version: 1.2.7-4etch2
Severity: wishlist

Launchpad bug #LP41313 includes a patch to change the hard-coded default
error policy from 'stop-printer' to 'retry-job' but Till Kamppeter, the
author of the patch, says:

    A better solution would be adding a directive "DefaultErrorPolicy"
    to cupsd.conf, so distros can set this to "Retry job" in their
    desktop versions and "Stop printer" in their enterprise server
    versions.

The included patch does this, keeping the behaviour the same (ie. the
default in cupsd.conf and the default default if this is not set is
still 'stop-printer').

I would copy send this to Launchpad too, but it seems I have as much of
a phobia against web forums as Launchpad does against email.

#! /bin/sh /usr/share/dpatch/dpatch-run
## 99_default_error_policy.dpatch by  <matthew.king@monnsta.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad cupsys-1.2.7-orig/conf/cupsd.conf.in cupsys-1.2.7/conf/cupsd.conf.in
--- cupsys-1.2.7-orig/conf/cupsd.conf.in	2008-01-10 14:08:08.000000000 +0000
+++ cupsys-1.2.7/conf/cupsd.conf.in	2008-01-10 13:49:19.000000000 +0000
@@ -47,6 +47,7 @@
 </Location>
 
 # Set the default printer/job policies...
+DefaultErrorPolicy stop-printer
 <Policy default>
   # Job-related operations must be done by the owner or an adminstrator...
   <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
diff -urNad cupsys-1.2.7-orig/scheduler/conf.c cupsys-1.2.7/scheduler/conf.c
--- cupsys-1.2.7-orig/scheduler/conf.c	2008-01-10 14:08:08.000000000 +0000
+++ cupsys-1.2.7/scheduler/conf.c	2008-01-10 13:49:19.000000000 +0000
@@ -107,6 +107,7 @@
   { "ConfigFilePerm",		&ConfigFilePerm,	CUPSD_VARTYPE_INTEGER },
   { "DataDir",			&DataDir,		CUPSD_VARTYPE_STRING },
   { "DefaultCharset",		&DefaultCharset,	CUPSD_VARTYPE_STRING },
+  { "DefaultErrorPolicy",	&DefaultErrorPolicy,	CUPSD_VARTYPE_STRING },
   { "DefaultLanguage",		&DefaultLanguage,	CUPSD_VARTYPE_STRING },
   { "DefaultLeaseDuration",	&DefaultLeaseDuration,	CUPSD_VARTYPE_INTEGER },
   { "DefaultPolicy",		&DefaultPolicy,		CUPSD_VARTYPE_STRING },
@@ -288,7 +289,8 @@
   cupsdSetString(&RemoteRoot, "remroot");
   cupsdSetString(&ServerHeader, "CUPS/1.2");
   cupsdSetString(&StateDir, CUPS_STATEDIR);
   cupsdSetString(&PidFile, "/var/run/cups/cupsd.pid");
+  cupsdSetString(&DefaultErrorPolicy, "stop-printer");
 
   if (!strcmp(CUPS_DEFAULT_PRINTCAP, "/etc/printers.conf"))
     PrintcapFormat = PRINTCAP_SOLARIS;
diff -urNad cupsys-1.2.7-orig/scheduler/conf.c.rej cupsys-1.2.7/scheduler/conf.c.rej
diff -urNad cupsys-1.2.7-orig/scheduler/printers.c cupsys-1.2.7/scheduler/printers.c
--- cupsys-1.2.7-orig/scheduler/printers.c	2008-01-10 14:08:08.000000000 +0000
+++ cupsys-1.2.7/scheduler/printers.c	2008-01-10 13:44:44.000000000 +0000
@@ -123,7 +123,7 @@
   cupsdSetString(&p->job_sheets[0], "none");
   cupsdSetString(&p->job_sheets[1], "none");
 
-  cupsdSetString(&p->error_policy, "stop-printer");
+  cupsdSetString(&p->error_policy, DefaultErrorPolicy);
   cupsdSetString(&p->op_policy, DefaultPolicy);
 
   p->op_policy_ptr = DefaultPolicyPtr;
diff -urNad cupsys-1.2.7-orig/scheduler/printers.h cupsys-1.2.7/scheduler/printers.h
--- cupsys-1.2.7-orig/scheduler/printers.h	2008-01-10 14:08:08.000000000 +0000
+++ cupsys-1.2.7/scheduler/printers.h	2008-01-10 13:40:47.000000000 +0000
@@ -104,7 +104,9 @@
 					/* Implicit class printers */
 VAR cupsd_printer_t	*DefaultPrinter	VALUE(NULL);
 					/* Default printer */
-VAR char		*DefaultPolicy	VALUE(NULL);
+VAR char		*DefaultErrorPolicy	VALUE(NULL),
+					/* Default error policy */
+			*DefaultPolicy	VALUE(NULL);
 					/* Default policy name */
 VAR cupsd_policy_t	*DefaultPolicyPtr
 					VALUE(NULL);
Matthew

-- 
I must take issue with the term "a mere child", for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
                                           --  Fran Lebowitz

--- End Message ---
--- Begin Message ---
Version: 1.3.0-1

Hi,

Matthew King [2008-01-10 14:31 +0000]:
> Launchpad bug #LP41313 includes a patch to change the hard-coded default
> error policy from 'stop-printer' to 'retry-job' but Till Kamppeter, the
> author of the patch, says:
> 
>     A better solution would be adding a directive "DefaultErrorPolicy"
>     to cupsd.conf, so distros can set this to "Retry job" in their
>     desktop versions and "Stop printer" in their enterprise server
>     versions.
> 
> The included patch does this, keeping the behaviour the same (ie. the
> default in cupsd.conf and the default default if this is not set is
> still 'stop-printer').

This is already fixed in cups 1.3.x:
http://www.cups.org/documentation.php/ref-cupsd-conf.html#ErrorPolicy

Thanks,

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: