libzypp: System plugin

libzypp 17.38.15

System plugin

Author
  Michael Andres ma@su.nosp@m.se.d.nosp@m.e

# Introduction

This is a statefull plugin executed at the end of zypp::ZYpp::commit, if the system content has change, i.e. if packages have actually been installed or deleted.

All plugins found in `/usr/lib/zypp/plugins/system` are launched. Unless otherwise specified, messages received need to be confirmed by sending an `ACC` message. Sending back an unexpected or `ERROR` message, the execution of the plugin will be canceled.

If you have e.g. `zypp-plugin-python` installed a basic system plugin could look like this:

    #!/usr/bin/env python
    #
    # zypp system plugin
    #
    import os
    import sys
    from zypp_plugin import Plugin

    class MyPlugin(Plugin):

      def PACKAGESETCHANGED(self, headers, body):

        // Installation has ended. The set of installed packages has changed.
        // ....

        self.ack()
      def

    plugin = MyPlugin()
    plugin.main()

See also
  Writing plugins

# PLUGINBEGIN

    PLUGINBEGIN
    userdata:TIDfoo42

    ^@

Sent as 1st message after the plugin was launched. Prepare your plugin and send an `ACC` message when you are done.

- `userdata:stringval` Optional header sent if the application has provided a user data string.
  See also
    User data as transaction id

# PACKAGESETCHANGED

    PACKAGESETCHANGED

    ^@

Installation has ended. The set of installed packages has changed.

See also
  zypp::sat::Transaction::Step

# PLUGINEND

    PLUGINEND

    ^@

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.