2

I need to build a deb for my application that adjusts some links in my system when installed (I do that in my postinst script). However, when a dependency is upgraded, I might also need to adjust my links. So, ideally I want my prerm (to remove all the links I created) und my postinst (to reestablish them again) to be called whenever my dependencies are updated. Is there a way to force this behavior for my package? If not, is there any other way I can achieve my goal, i.e., some magic script that is called on dependency changes?

loonytune
  • 1,775
  • 11
  • 22
  • 1
    This would fit better on Super User, no? Anyway, if you need to reconfigure when a specific file is changed you can try using dpkg triggers: https://stackoverflow.com/questions/15276535/ – Pezo Jun 17 '17 at 18:38
  • this works fine, post it as an answer and I'll mark it as accepted – loonytune Jul 07 '17 at 20:33

1 Answers1

2

If you need to reconfigure when a specific file is changed you can try using dpkg triggers: dpkg: How to use trigger?

Pezo
  • 1,458
  • 9
  • 15