[opensuse] How to add a package-specific, post-update-or-install script hook to a zypper action?
I'd like to add a hook to zypper install/update. Whenever any or all of a specific set of packages blah blah-tools blah* is updated, I want to run a script after the installs are complete and successful sh ~/scripts/somescript.sh I took a look at Extending ZYpp: Plugins and Hooks https://doc.opensuse.org/projects/libzypp/HEAD/zypp-plugins.html but don't see, or maybe understand, how that applies to my case. Is there a straightforward way in opensuse/zypper to trigger a script whenever a specific package is installed or updated? LT -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Tue, 07 Apr 2015 17:30:00 -0700 lyndat3@your-mail.com пишет:
I'd like to add a hook to zypper install/update.
Whenever any or all of a specific set of packages
blah blah-tools blah*
is updated, I want to run a script after the installs are complete and successful
sh ~/scripts/somescript.sh
I took a look at
Extending ZYpp: Plugins and Hooks https://doc.opensuse.org/projects/libzypp/HEAD/zypp-plugins.html
but don't see, or maybe understand, how that applies to my case.
Is there a straightforward way in opensuse/zypper to trigger a script whenever a specific package is installed or updated?
You can create RPM that contains trigger which runs every time another RPM is installed/removed. "Update" is actually a sequence of "install new version, remove old version". RPM with triggers will need to be installed just once and remains on system. I'm not sure about "complete and successful" part - I think RPM will stop if error are encountered during RPM installation before doing anything else, but I have never tried it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
lyndat3@your-mail.com