libzypp: zypp::target::CommitActiveReport Class Reference

libzypp 17.38.15

zypp::target::CommitActiveReport Class Reference

Fired exactly once per TargetImpl::commit call, marking the point at which the actual RPM transaction becomes irreversible. More...

`#include <zypp/ZYppCallbacks.h>`

Inheritance diagram for zypp::target::CommitActiveReport:

## Public Member Functions
virtual bool | start (const UserData &=UserData())
| Called once, synchronously, before the irreversible transaction begins.
virtual void | end (const UserData &=UserData())
| Called when all target state has been written.
virtual void | step (const UserData &=UserData())
Public Member Functions inherited from zypp::callback::ReportBase
virtual void | report (const UserData &userData_r=UserData())
| The most generic way of sending/receiving data.
virtual | ~ReportBase ()

## Additional Inherited Members
Public Types inherited from zypp::callback::ReportBase
typedef callback::UserData | UserData
typedef UserData::ContentType | ContentType

## Detailed Description

Fired exactly once per TargetImpl::commit call, marking the point at which the actual RPM transaction becomes irreversible.

This report exists to give callers (e.g. an MCP worker mediating cancellation requests) a single, backend-agnostic synchronization point: start is called before any persistent state (locks, requested locales, autoinstalled) is written or the RPM transaction begins, regardless of Legacy vs SingleTrans backend.

Returning `false` aborts the commit TargetImpl::commit throws TargetAbortedException. This lets a receiver (e.g. one mediating an external cancellation request) decline safely rather than relying on an external process signal racing against the point of no return.

Definition at line 603 of file ZYppCallbacks.h.

## Member Function Documentation

## ◆ start()

virtual bool zypp::target::CommitActiveReport::start | ( | const UserData & | = UserData() | ) |
| inlinevirtual

Called once, synchronously, before the irreversible transaction begins.

Return `false` to abort the commit before anything has been touched.

Definition at line 608 of file ZYppCallbacks.h.

## ◆ end()

virtual void zypp::target::CommitActiveReport::end | ( | const UserData & | = UserData() | ) |
| inlinevirtual

Called when all target state has been written.

Commit is done and safe.

Definition at line 613 of file ZYppCallbacks.h.

## ◆ step()

virtual void zypp::target::CommitActiveReport::step | ( | const UserData & | = UserData() | ) |
| inlinevirtual

Definition at line 616 of file ZYppCallbacks.h.

The documentation for this class was generated from the following file:

- zypp/ZYppCallbacks.h