TransactionPackage

class TransactionPackage

Describe transaction operation related to rpm Package.

Public Types

using Action = transaction::TransactionItemAction
using Reason = transaction::TransactionItemReason
using State = transaction::TransactionItemState

Public Functions

libdnf5::rpm::Package get_package() const
Returns:

the underlying package.

Action get_action() const noexcept
Returns:

the action being performed on the transaction package.

State get_state() const noexcept
Returns:

the state of the package in the transaction.

Reason get_reason() const noexcept
Returns:

the reason of the action being performed on the transaction package.

std::vector<rpm::Package> get_replaces() const noexcept
Returns:

packages replaced by this transaction package.

const std::vector<rpm::Package> &get_replaced_by() const noexcept
Returns:

packages that replace this transaction package (for transaction packages that are leaving the system).

const std::string *get_reason_change_group_id() const noexcept

The REASON_CHANGE action requires group id in case the reason is changed to GROUP

Returns:

id of group the package belongs to

~TransactionPackage()
TransactionPackage(const TransactionPackage &mpkg)
TransactionPackage &operator=(const TransactionPackage &mpkg)
TransactionPackage(TransactionPackage &&mpkg) noexcept
TransactionPackage &operator=(TransactionPackage &&mpkg) noexcept

Friends

friend class Transaction::Impl
friend class ::BaseGoalTest
friend class ::RpmTransactionTest