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

Re: Request service reload after package install



Hi Gianfranco and The Wanderer,

On 22/03/2016 15:04, The Wanderer wrote:
> On 2016-03-22 at 09:28, Gianfranco Costamagna wrote:
>> Hi, do the post* files in virtualbox-ext-pack package help? they have
>> some user interaction, and restart of services IIRC.
> 
> Restarting services after package installation is relatively common, and
> can be seen in the postinst files of many packages. The one which I most
> often see, as a prompt with a list of services to be restarted, is
> libc6.

I think libc6 post* files are closer to what I want to achieve than virtualbox-ext-pack post* files.
Thank you for this example...
Especially because it gives me another goal: to also trigger restart whenever dependencies are updated. But I think this is not possible without the cooperation of the
dependency package, right?
In this particular case the main dependency that should trigger the restart would be openjdk-7-jre.

> However, as far as I'm aware, all of them have one flaw in common: if
> you install multiple packages which require restart of the same service
> (including, e.g., multiple architectures' versions of the same package;
> this happens with libc6 on a multiarch system), the service will be
> restarted multiple times - once per package. Giulio specifically cited
> having only one service restart per "session" as one of his goals.

It is one of my goal, because the service requires about 10 seconds to start.
And the typical installation involves more than ten independent plugins.

Another option would be to prevent automatic restart during installation/update
and always perform manual restart at the end of the update.

> I don't know of any way to avoid or work around this multiple-restart
> behavior which would be clean and robust enough to be worth
> implementing, except for adding support for this sort of state handling
> to the tools which do the installation - apt and dpkg, probably in an
> interlocking way. Unfortunately, I don't know of a good design for this,
> and I infer from the fact that it's never been done that no one else has
> come up with one either.

Clear enough.

Bests,
	Giulio


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: