dpkg-divert breaks nginx installation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nginx (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
On 14.04, adding a divert for /etc/nginx/
Setting up nginx-common (1.4.6-1ubuntu3.3) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up nginx-core (1.4.6-1ubuntu3.3) ...
cat: /etc/nginx/
Setting up nginx (1.4.6-1ubuntu3.3) ...
But then after, it would setup the package with the diversion and then start the nginx service.
On 15.04, nginx is started during an earlier step, failing to configure nginx and then dropping out in an un-configured state.
Is this an issue with the way that ngnix configures itself or an issue with running dpkg-divert in the third-party package's preinst script?
Installation snippet:
(...)
Adding 'diversion of /etc/nginx/
(...)
Setting up nginx-core (1.6.2-5ubuntu3.1) ...
Job for nginx.service failed. See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-core (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-core (>= 1.6.2-5ubuntu3.1) | nginx-full (>= 1.6.2-5ubuntu3.1) | nginx-light (>= 1.6.2-5ubuntu3.1) | nginx-extras (>= 1.6.2-5ubuntu3.1); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-core (<< 1.6.2-5ubuntu3.
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving uNo apport report written because the error message indicates its a followup error from a previous failure.
nconfigured
dpkg: dependency problems prevent configuration of ka-lite-
ka-lite-
Package nginx is not configured yet.
Package nginx-core which provides nginx is not configured yet.
dpkg: error processing package ka-lite-
dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (219-7ubuntu3) ...
Errors were encountered while processing:
nginx-core
nginx
ka-lite-
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm going to take a wild guess that the issue is because vivid's nginx-common. postinst has this line:
invoke-rc.d nginx start || exit $?
Which will make postinst fail if nginx fails to start for the first time.
15.04:
http:// bazaar. launchpad. net/~ubuntu- branches/ ubuntu/ vivid/nginx/ vivid/view/ head:/debian/ nginx-core. postinst
14.04 did not have this behaviour:
http:// bazaar. launchpad. net/~ubuntu- branches/ ubuntu/ trusty/ nginx/trusty/ view/head: /debian/ nginx-common. postinst