Accepted: cups-pdf 2.4.6-4ubuntu1 (source)

Matt Zimmerman mdz at canonical.com
Tue Nov 20 14:53:45 GMT 2007


On Tue, Nov 20, 2007 at 12:30:52PM +0000, Till Kamppeter wrote:
> Matt Zimmerman wrote:
>> On Tue, Nov 20, 2007 at 12:06:32PM +0000, Till Kamppeter wrote:
>>> Matt Zimmerman wrote:
>>>> On Tue, Nov 20, 2007 at 10:30:22AM -0000, Till Kamppeter wrote:
>>>>>    * debian/postinst, debian/postrm: Restart of CUPS daemon not needed,
>>>>>      restarting only causes CUPS daemon not listening immediately after
>>>>>      restart and so the PDF queue not being created. So removed any
>>>>>      restart of the CUPS daemon from the maintainer script. We only 
>>>>> start
>>>>>      the CUPS daemon if it is not actually running, because we need it
>>>>>      for having a PDF printer (LP: #152293).
>>>> This does not sound correct to me.  If you don't restart CUPS in 
>>>> postinst,
>>>> then the old version will still be running after the upgrade.
>>>> Can you explain?
>>> From version 1.2.x on CUPS does not need to be restarted any more when 
>>> adding PPDs and backends and it never needed to be restarted after adding 
>>> a queue with lpadmin. cups-pdf does nothing more than that. The 
>>> installation of the package adds the cups-pdf backend and the PPD file, 
>>> the postinst script runs lpadmin to add the queue. All these actions do 
>>> not require CUPS to be restarted. The fallback to adding the queue by 
>>> editing configuration files is only done if CUPS is not running. Next 
>>> time CUPS starts it will see and use the queue then.
>> It is standard practice when upgrading a package with a daemon to ensure
>> that the new version is running (this is even done for base infrastructure
>> like upstart).
>> Consider, for example, that a security fix may have been applied in the 
>> new
>> version, and would not take effect unless the daemon were restarted.
>> As far as I can tell, the only reason you changed this was because you
>> needed the daemon to be running in order to add the PDF queue.  A better
>> solution would be to wait for it to start before adding the queue, rather
>> than removing the code which restarts it.
>
> cups-pdf does not ship a daemon. The cupsd comes from the cupsys package. 
> So an update of cups-pdf does not replace the daemon code.
>
> The CUPS daemon restart in cups-pdf is a relict of CUPS 1.1.x times. There 
> CUPS needed to be restarted to get knowledge of the new PPD and backend. 
> Now this is not needed any more and so I removed the unnecessary restart.

Oh, I understand.  Thanks for the explanation.

-- 
 - mdz



More information about the ubuntu-devel mailing list