[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Checking if another package is upgraded at the same time



I'm maintaining two interrelated packages, crossfire-server and
crossfire-maps.  The former depends on the latter.  It is possible to
upgrade them separately, but upgrading the maps alone leads to
problems.  The server runs as a daemon and will be more or less at an
inconsistent state if the maps are upgraded while it is running.

Restarting the server needs to be done when upgrading crossfire-maps.
But having one package to automatically cause another to run
/etc/init.d/foo restart is certain to surprise a number of users.
Using debconf to ask whether to abort install, install and restart or
just install sounds like a good idea to me.

But doing this leads to another slight problem when upgrading
crossfire-server and crossfire-maps at the same time.  Namely, the
question in crossfire-maps is unnecessary in this case since upgrading
crossfire-server will restart the server anyway.  So I'd like to have
crossfire-maps to simply go ahead and install the files if the server
is upgraded on the same run.  Is there any reliable way to check if
the server is being upgraded in crossfire-maps' preinst?

Of course, the question is also unneeded when the server isn't running
or even installed at all.

Attachment: signature.asc
Description: Digital signature


Reply to: