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