[25641] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25136 - in trunk/debathena/config/printing-config:

daemon@ATHENA.MIT.EDU (Liz A. Denys)
Wed Jun 15 15:15:17 2011

Date: Wed, 15 Jun 2011 15:15:00 -0400 (EDT)
From: "Liz A. Denys" <lizdenys@MIT.EDU>
To: Jonathan D Reed <jdreed@mit.edu>
cc: source-commits@mit.edu
In-Reply-To: <201106142007.p5EK7GVT019029@drugstore.mit.edu>
Message-ID: <alpine.DEB.2.00.1106151514580.18895@taboo>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

ACK

-- 
Liz A. Denys
lizdenys@mit.edu

On Tue, 14 Jun 2011, Jonathan D Reed wrote:

> Date: Tue, 14 Jun 2011 16:07:16 -0400
> From: Jonathan D Reed <jdreed@MIT.EDU>
> To: source-commits@mit.edu
> Subject: /svn/athena r25136 - in trunk/debathena/config/printing-config:
>     debathena/printing debian
> 
> Author: jdreed
> Date: 2011-06-14 16:07:16 -0400 (Tue, 14 Jun 2011)
> New Revision: 25136
>
> Modified:
>   trunk/debathena/config/printing-config/debathena/printing/lpr.py
>   trunk/debathena/config/printing-config/debathena/printing/test_lpr.py
>   trunk/debathena/config/printing-config/debian/changelog
> Log:
> In printing-config:
>  * Kill LPROPT with fire (Trac: #882)
>  * That's not how you spell 'nonexistent'
>
>
> Modified: trunk/debathena/config/printing-config/debathena/printing/lpr.py
> ===================================================================
> --- trunk/debathena/config/printing-config/debathena/printing/lpr.py	2011-06-14 19:43:37 UTC (rev 25135)
> +++ trunk/debathena/config/printing-config/debathena/printing/lpr.py	2011-06-14 20:07:16 UTC (rev 25136)
> @@ -62,10 +62,6 @@
>
> def _main(args):
>     args.pop(0)
> -    if 'LPROPT' in os.environ:
> -        args = shlex.split(os.environ['LPROPT']) + args
> -        # If we leave LPROPT set, LPRng will count the options twice
> -        del os.environ['LPROPT']
>
>     queue = common.get_default_printer()
>     argstyle = None
> @@ -117,6 +113,9 @@
>     if system == common.SYSTEM_CUPS and argstyle == common.SYSTEM_LPRNG:
>         args = translate_lprng_args_to_cups(args)
>
> +    if system == common.SYSTEM_CUPS and 'LPROPT' in os.environ:
> +        sys.stderr.write("Use of the $LPROPT environment variable is deprecated and\nits contents will be ignored.\nSee http://kb.mit.edu/confluence/x/awCxAQ\n")
> +
>     common.dispatch_command(system, 'lpr', args)
>
>
>
> Modified: trunk/debathena/config/printing-config/debathena/printing/test_lpr.py
> ===================================================================
> --- trunk/debathena/config/printing-config/debathena/printing/test_lpr.py	2011-06-14 19:43:37 UTC (rev 25135)
> +++ trunk/debathena/config/printing-config/debathena/printing/test_lpr.py	2011-06-14 20:07:16 UTC (rev 25136)
> @@ -65,7 +65,7 @@
>         self.mox.StubOutWithMock(os, 'execvp')
>
>
> -class TestNonexistantPrinter(TestLpr):
> +class TestNonexistentPrinter(TestLpr):
>     # LPROPT, PRINTER are unset
>     environ = {'ATHENA_USER': 'quentin'}
>
> @@ -88,31 +88,6 @@
>         lpr._main(['lpr', '-Pstark', 'puppies biting nose.jpg'])
>
>
> -class TestLpropt(TestLpr):
> -    environ = {'ATHENA_USER': 'jdreed', 'LPROPT': '-Zduplex'}
> -    backends = ['get-print.mit.edu']
> -
> -    def test(self):
> -        """Test printing with LPROPT set.
> -
> -        Taken from Trac #509, reported on Mar 12, 2010."""
> -        # We now call common.find_queue twice
> -        common._hesiod_lookup('ajax', 'pcap').AndReturn(['ajax:rp=ajax:rm=GET-PRINT.MIT.EDU:ka#0:mc#0:'])
> -        common.get_cups_uri('ajax').AndReturn(None)
> -        common.is_cups_server('GET-PRINT.MIT.EDU').AndReturn(True)
> -        common.get_default_printer().AndReturn(None)
> -        common._hesiod_lookup('ajax', 'pcap').AndReturn(['ajax:rp=ajax:rm=GET-PRINT.MIT.EDU:ka#0:mc#0:'])
> -        common.get_cups_uri('ajax').AndReturn(None)
> -        common.is_cups_server('GET-PRINT.MIT.EDU').AndReturn(True)
> -
> -        # Result:
> -        os.execvp('cups-lpr', ['lpr', '-Ujdreed', '-Pajax', '-osides=two-sided-long-edge', '-m'])
> -
> -        self.mox.ReplayAll()
> -
> -        lpr._main(['lpr', '-P', 'ajax'])
> -
> -
> class TestNoLpropt(TestLpr):
>     environ = {'ATHENA_USER': 'jdreed'}
>     backends = ['get-print.mit.edu']
>
> Modified: trunk/debathena/config/printing-config/debian/changelog
> ===================================================================
> --- trunk/debathena/config/printing-config/debian/changelog	2011-06-14 19:43:37 UTC (rev 25135)
> +++ trunk/debathena/config/printing-config/debian/changelog	2011-06-14 20:07:16 UTC (rev 25136)
> @@ -1,8 +1,10 @@
> debathena-printing-config (1.23.3) unstable; urgency=low
>
>   * Don't barf on unexpected args (Trac #719)
> +  * Kill LPROPT with fire (Trac: #882)
> +  * That's not how you spell 'nonexistent'
>
> - -- Jonathan Reed <jdreed@mit.edu>  Tue, 14 Jun 2011 15:41:41 -0400
> + -- Jonathan Reed <jdreed@mit.edu>  Tue, 14 Jun 2011 16:07:10 -0400
>
> debathena-printing-config (1.23.2) unstable; urgency=low
>
>
>

home help back first fref pref prev next nref lref last post