Re: promoting virtualbox-dkms to virtualbox pre-depends
* Ritesh Raj Sarraf <email@example.com> [150923 12:54]:
> > Each call to dpkg will cause the triggers to be run, so if
> > apt(itude) happens to separate the vbox and vbox-dkms installations
> > into separate runs of dpkg, vbox might be restarted the first time
> > with the wrong module, but it will be corrected in a subsequent run.
> Hmmm.. I think I have seen this kind of error some time ago.
> So how is such error supposed to be treated ? Ignore it ? I guess the
> final result of apt is still a success, in such cases.
First, you should start your service in the trigger, not in your
postinst. From the dpkg man page (I am really stretching with this
inference, so someone else can clarify) it looks like a failure in the
trigger will leave the package in the triggers-pending state. However,
you should make sure the trigger does not fail even if the vbox service
does not start correctly.
>From the first time I had dpkg mark a package as half-configured when
everything was correct except that the service would not start for some
reason that had nothing to do with package installation (exactly the
situation here for virtualbox), I have felt that dpkg had no business
failing just because the service would not start. I think that is a
wrong design decision.
In fact, one specific case that often hurts me is when I have xen
installed on a machine where I only run the hypervisor occasionally.
Upgrading the xen packages causes (or has caused in the past) the
upgrade to fail. This is ridiculous!
I think it should be documented in the developers reference that if you
attempt to start or restart a service in postinst, you should guard it
so that a failure in the service does not propagate to a failure of the