0

I have created a native debian package package1-1.0_all.deb which depends on package2 (>=1.0)

apt-get install package1 will also install package2 as package1 to depends on package2

But i would like to reinstall package1 , if package2 is upgraded to new version are any of its files are changed

Hope this is the solution i need dpkg: How to use trigger?

but this would call package1.postinst script with trigger as an argument and i cannot install any other package from the postinst scripts

another solution would be creating a deamon script which monitor the changes in package2

Moreover i am not sure package1.postinst script is called as soon as there are any changes in the files we watch on Or Triggers are called only while installing packages through apt-get

Community
  • 1
  • 1
forum.test17
  • 2,119
  • 6
  • 30
  • 62
  • I think you can have package1 require that package2 is exactly of the version you need, e.g. = 1.0, instead of >= 1.0. This way when package 2 is updated, the upgrade should be held back until a version of package1 is available that depends on the new version of package2. – TeTeT Jun 14 '13 at 14:52
  • seems to be kind of interesting solution, but would stop upgrading package2 which i do no want :), – forum.test17 Jun 14 '13 at 18:02
  • As you cannot install a package from within another package, you probably want to use an external watchdog for the files in package2 that are important to package1. For example, inotify might be used for that, check the inotify-tools package. – TeTeT Jun 14 '13 at 21:12
  • For the time being i am using the same solution, but wanted to know whether we have any debian way of solving it? – forum.test17 Jun 16 '13 at 11:22

0 Answers0