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

dpkg - triggers looping



Hello List,

I think i need a hint from an experienced deb packager. Unfortunately i created a looping trigger within my own packages and try to resolve this.
I use Ubuntu 16.04/dpkg-1.18.4ubuntu1.2

Situations is as follows: For my servers i do packaging of software on my own. I have packaged and installed my own php 7.0.14 and now want to upgrade to 7.0.19 . creating patches, building etc all was successful. My problem occurs when installing package libapache2-mod-php70
I got this message:

Unpacking php70-common (7.0.19-my1) over (7.0.14-my1) ...
Setting up php70-common (7.0.19-my1) ...
dpkg: cycle found while processing triggers:
 chain of packages whose triggers are or may be responsible:
  libapache2-mod-php70 -> libapache2-mod-php70
 packages' pending triggers which are or may be unresolvable:
  libapache2-mod-php70: /etc/php70/conf.d
dpkg: error processing package libapache2-mod-php70 (--configure):
 triggers looping, abandoned
Setting up php70-cli (7.0.19-my1) ...

The problem seems to be located in file /var/lib/dpkg/triggers/File in this line: "/etc/php70/conf.d libapache2-mod-php70" As i understood this loop php70-common is adding a file to /etc/php70/conf.d and triggers action for libapache2-mod-php70. Folder /etc/php70/conf.d is also part of libapache2-mod-php70 respectively libapache2-mod-php70 is not configured at this point and so the package libapache2-mod-php70 is triggering itself und leads to a loop. Ist this the right understanding? I can manually fix the problem by editing file /var/lib/dpkg/triggers/File and change "/etc/php70/conf.d libapache2-mod-php70" to "/etc/php7/conf.d libapache2-mod-php70" before any installation. But i dont want to do this on every of my servers in manual way.

Ist there a way to fix this automatically during packageinstallation?
I tried 2 ways:
- I removed libapache2-mod-php70.triggers in new package because i dont really need it. - i tried to change /var/lib/dpkg/triggers/File and /var/lib/dpkg/info/libapache2-mod-php70.triggers in .preinst script. File editing is basically working ( i print out file contents in preinst) but this is not changing the error message. It seems dpkg reads file contents before any installation.

I think i need a helping hand of a pro please.

What should i do now? What would be a professional way to solve this issue?

Thanks,
Hajo



Reply to: