3 \page plugin-system System plugin
5 \author Michael Andres <ma@suse.de>
7 <HR><!-- ====================================================================== -->
8 \section intro Introduction
10 This is a statefull plugin executed at the end of \ref zypp::ZYpp::commit, if the system content has change, i.e. if packages have actually been installed or deleted.
12 All plugins found in \c /usr/lib/zypp/plugins/system are launched. Unless otherwise specified, messages received need to be confirmed by sending an \c ACC message. Sending back an unexpected or \c ERROR message, the execution of the plugin will be canceled.
14 If you have e.g. \c zypp-plugin-python installed a basic system plugin could look like this:
23 from zypp_plugin import Plugin
25 class MyPlugin(Plugin):
27 def PACKAGESETCHANGED(self, headers, body):
29 // Installation has ended. The set of installed packages has changed.
39 \see \ref plugin-writing
41 <HR><!-- ====================================================================== -->
42 \section pluginbegin PLUGINBEGIN
49 Sent as 1st message after the plugin was launched. Prepare your plugin and send an \c ACC message when you are done.
51 \li \c userdata:stringval Optional header sent if the application has provided a user data string. \see \ref zypp-userdata
54 <HR><!-- ====================================================================== -->
55 \section packagesetchanged PACKAGESETCHANGED
61 Installation has ended. The set of installed packages has changed.
63 \see \ref zypp::sat::Transaction::Step
65 <HR><!-- ====================================================================== -->
66 \section pluginend PLUGINEND
72 This message is sent at the end before the plugin is closed. You should receive this message even if the action was aborted by some unexpected exception.