Public bug reported: On 14.04, adding a divert for /etc/nginx/nginx.conf would have the package installation and configuration proceed after installing with just one error:
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/nginx.conf: No such file or directory 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/nginx.conf to /etc/nginx/nginx.conf-ka-lite-raspberry-pi by ka-lite-raspberry-pi' (...) 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.1.1~) | nginx-full (<< 1.6.2-5ubuntu3.1.1~) | nginx-light (<< 1.6.2-5ubuntu3.1.1~) | nginx-extras (<< 1.6.2-5ubuntu3.1.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. 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. No 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-raspberry-pi: ka-lite-raspberry-pi depends on nginx; however: Package nginx is not configured yet. Package nginx-core which provides nginx is not configured yet. dpkg: error processing package ka-lite-raspberry-pi (--configure): 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-raspberry-pi E: Sub-process /usr/bin/dpkg returned an error code (1) ** Affects: nginx (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1483923 Title: dpkg-divert breaks nginx installation To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1483923/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs