libzypp 9.41.1

User data as transaction id

Author:
Michael Andres <ma@suse.de>

Introduction

It is possible to store a user defined data string via zypp::ZConfig::setUserData inside libzypp for use as a transaction id. Zypper e.g. supports this via its global '--userdata <string>' option.

  • Setting a new user data string, a line will be written to the log file. So you can grep for it, or for '(setUserData)' to find all locations where user data strings were set.
  • The user data string will also be passed to commit plugins, so they can make use of it. The btrfs e.g would be able to tag created snapshots with this string.
    See also:
    Commit plugin
  • The user data string will appear on each histoy line logging package or repository related events (install, delete, add, modify).
    See also:
    zypp::HistoryLog and zypp::parser::HistoryLogReader