Hook into installation of Debian package

Solution 1:

I know this question is old, but I found it when searching for "debian package hook" which was the wrong keyword list.

There might actually be a way with dpkg's triggers:

A dpkg trigger is a facility that allows events caused by one package but of interest to another package to be recorded and aggregated, and processed later by the interested package.

I knew it existed, but have never worked with it, yet.