/usr/lib/zypp/plugins/commit
are launched. The plugins will receive messages as commit proceeds. Unless otherwise specified messages received need to be confirmed by sending an ACC
message. Sending back an ERROR
message execution of the plugin will be canceled.
If you have e.g. zypp-plugin-python
installed a basic commit plugin could look like this:
#!/usr/bin/env python # # zypp commit plugin # import os import sys from zypp_plugin import Plugin class MyPlugin(Plugin): def PLUGINBEGIN(self, headers, body): # commit is going to start. self.ack() def PLUGINEND(self, headers, body): # commit ended self.ack() plugin = MyPlugin() plugin.main()
PLUGINBEGIN ^@
ACC
message when you are done. Commit will start after all plugins are initialized.
PLUGINEND ^@