[25745] in Source-Commits
Re: /svn/athena r25209 - in trunk/debathena/config/printing-config:
daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Sat Jul 2 18:36:00 2011
Date: Sat, 2 Jul 2011 18:35:52 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201107010154.p611s9DZ013853@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1107021833170.6818@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Thu, 30 Jun 2011, Jonathan D Reed wrote:
> Author: jdreed
> Date: 2011-06-30 21:54:09 -0400 (Thu, 30 Jun 2011)
> New Revision: 25209
>
> Modified:
> trunk/debathena/config/printing-config/debathena/printing/simple.py
> trunk/debathena/config/printing-config/debian/changelog
> Log:
> In printing-config:
> * Deal with CUPS' lprm's stupid syntax (Trac: #720)
>
>
> Modified: trunk/debathena/config/printing-config/debathena/printing/simple.py
> ===================================================================
> --- trunk/debathena/config/printing-config/debathena/printing/simple.py 2011-06-30 20:09:43 UTC (rev 25208)
> +++ trunk/debathena/config/printing-config/debathena/printing/simple.py 2011-07-01 01:54:09 UTC (rev 25209)
> @@ -16,6 +16,15 @@
>
> def simple(command, optinfo, queue_opt, args):
> args.pop(0)
> +
> + # Sigh. CUPS' lprm, in its infinite wisdom, accepts '-' as a
> + # specifier for 'all jobs', which doesn't work with any option
> + # parsing code, ever. However, CUPS does require that it be the
> + # last argument, so check for it, and save it because parse_args
> + # will kill it
> + lprmdash=False
> + if (command == 'lprm') and len(args) and (args[-1] == '-'):
> + lprmdash=True
Won't parse_args kill it for lprng queues, too? I know they're going away
soon, but if we're going to not support lprng, we should rip out a lot of
the compatibility/translation layer we have.
>
> queue = common.get_default_printer()
> try:
> @@ -29,6 +38,7 @@
> # Now that we've sliced up the arguments, put them back
> # together
> args = [o + a for o, a in options] + arguments
> +
> except ValueError:
> # parse_args returned None, so we learned nothing. We'll just
> # go with the default queue
> @@ -47,4 +57,8 @@
> if server:
> os.environ['CUPS_SERVER'] = server
>
> + # And now add it back (see above)
> + if lprmdash and (system == common.SYSTEM_CUPS):
> + args.append('-')
So I guess what I'm asking is whether the SYSTEM_CUPS check should be
removed here.
-Ben
> +
> common.dispatch_command(system, command, args)
>
> Modified: trunk/debathena/config/printing-config/debian/changelog
> ===================================================================
> --- trunk/debathena/config/printing-config/debian/changelog 2011-06-30 20:09:43 UTC (rev 25208)
> +++ trunk/debathena/config/printing-config/debian/changelog 2011-07-01 01:54:09 UTC (rev 25209)
> @@ -5,8 +5,9 @@
>
> [ Jonathan Reed ]
> * No, really, don't barf on unexpected args (Trac: #719)
> + * Deal with CUPS' lprm's stupid syntax (Trac: #720)
>
> - -- Jonathan Reed <jdreed@mit.edu> Mon, 27 Jun 2011 15:18:22 -0400
> + -- Jonathan Reed <jdreed@mit.edu> Thu, 30 Jun 2011 21:48:29 -0400
>
> debathena-printing-config (1.23.3) unstable; urgency=low
>
>
>