Accepted: cups-pdf 2.4.6-4ubuntu1 (source)
Matt Zimmerman
mdz at ubuntu.com
Tue Nov 20 12:12:56 GMT 2007
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.
--
- mdz
More information about the ubuntu-devel
mailing list