Web lists-archives.com

Re: How to execute user's scripts when upgrading a certain package via apt/aptitude

On 2018-03-29 03:40, tomas@xxxxxxxxxx wrote:
On Wed, Mar 28, 2018 at 08:18:24PM +0200, Mikhail Morfikov wrote:
On 2018-03-28 20:12, Sven Joachim wrote:
I really thought there's some easy way to include user's scripts when you want
to make some additional changes to the upgraded packages, but it looks like the
apt mechanism is a little bit limited. But I will try to do something with the
trigger and see how that will work.

I think the trick is to create a (nearly) empty package "my-firefox-custom"
which depends on firefox and thus pulls it in before its own post-install
takes over.
This sounds as if it should work, but your custom package would need
upgrading every time Firefox was upgraded, so the automation would be lost.

@Sven, depending on how you do your upgrades, maybe a script could interrogate apt-get as to what packages it intended to upgrade, before performing it. If 'firefox' was found, the extra action could be taken. So you'd write a wrapper around 'apt-get'.