Vincent,

On Jun 27, 2013, at 8:21 AM, Vincent Lefevre <vinc...@vinc17.net> wrote:
> On 2013-06-27 11:28:51 +0200, Vincent Lefevre wrote:
>> This problem still occurs after the upgrade to cups 1.6.2-10.
> 
> In the changelog:
> 
>    printers' list to avoid jobs to go to unexpected printers
>    (Closes: #711848)
> 
> This patch was modifying the cupsGetDests2() function, which was
> already working here and was not used by lp and lpr. These commands
> use cupsGetNamedDest() instead, and the bug seems to be there. I've
> written a patch (attached) to modify cupsGetNamedDest() so that it
> mimics what lpq does: instead of using
> 
>  _cupsGetDests(http, CUPS_GET_DEFAULT, NULL, &dest, 0, 0)
> 
> which returns a wrong default (the system default instead of the
> default from ~/.cups/lpoptions), it uses cupsGetDests2 and gets
> the default.
> 
> I don't know whether this patch is clean (in particular, I'm not sure
> about the memory handling) and I haven't tested it extensively, but it
> solves my problem.
> 
> BTW, it's rather annoying that different functions/commands use
> different interfaces to get the default printer. This leads to
> inconsistencies, as shown here.


cupsGetNamedDest was created specifically to avoid getting the whole printer 
list because that can take a long time (comparatively).  I will investigate a 
separate fix for cupsGetNamedDest that uses the lpoptions default over the 
system default.

That said, The inconsistencies reflect the desires of Linux distributors, 
users, and Apple - originally there was One True Default printer, maintained by 
the administrator for the system.  Then one could set a network default if no 
local default existed.  Then we needed user-savable options and defaults.  Then 
we needed to be able to set system-side defaults.  Then we wanted a 
last-used-printer scheme if no user default was set.  Aaarrrggghhh! 
(http://www.youtube.com/watch?v=avpFGlv7iw8)

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair


-- 
To UNSUBSCRIBE, email to debian-printing-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/b2216b48-dd2f-471f-8094-b5bf025f1...@apple.com

Reply via email to