47 {
return backup( status_r ); }
82 if ( ! status.
setLock(
false, causer_r ) )
return false;
83 if ( ! status.
setTransact(
true, causer_r ) )
return false;
91 if ( ! status.
setTransact(
false, causer_r ) )
return false;
92 if ( ! status.
setLock(
true, causer_r ) )
return false;
100 if ( ! status.
setTransact(
false, causer_r ) )
return false;
101 if ( ! status.
setLock(
false, causer_r ) )
return false;
111 if ( ! status.
setTransact(
false, causer_r ) )
return false;
122 if ( ! status.
setTransact(
false, causer_r ) )
return false;
131 template <
class TIter>
134 for_( it, begin_r, end_r )
135 if ( ! (this->*action_r)( *it, causer_r ) )
154 ,
inst( impl.installedObj() )
155 ,
cand( impl.candidateObj() )
249 it->status().setTransact(
false,
causer );
250 it->status().setLock(
true,
causer );
400 if ( newCandidate_r )
404 if ( *it == newCandidate_r )
414 PoolItem trans( transactingCandidate() );
415 if ( trans && trans != newCandidate )
433 return _candidate = newCandidate;
456 std::vector<PoolItem> i;
457 std::vector<PoolItem>
a;
460 if ( identical( *it, pi_r ) )
463 if ( identical( *it, pi_r ) )
502 if ( i.empty() && !
a.empty() )
527 if ( ! i.empty() && !
a.empty() )
578 std::vector<PoolItem> i;
579 std::vector<PoolItem>
a;
584 if ( identical( *it, pi_r ) )
592 if ( identical( *it, pi_r ) )
612 for_( it, i.begin(), i.end() )
613 if ( it->status().isLocked() )
618 bool allALocked =
true;
619 for_( it,
a.begin(),
a.end() )
620 if ( ! it->status().isLocked() )
634 && ( ta ? ta : *
a.begin() ).status().isSatisfied() )
Combining sat::Solvable and ResStatus.
ResStatus & status() const
Returns the current status.
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
bool setLock(bool toLock_r, TransactByValue causer_r)
Apply a lock (prevent transaction).
bool maySetTransact(bool val_r, TransactByValue causer)
TransactByValue getTransactByValue() const
IdString ident() const
The identifier.
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Try to set a new Status.
available_iterator availableEnd() const
installed_iterator installedBegin() const
PoolItem installedObj() const
The last Installed object.
IdString ident() const
The identifier.
installed_iterator installedEnd() const
available_iterator availableBegin() const
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Set a candidate (out of available objects).
PoolItem candidateObj() const
The 'best' or 'most interesting' among all available objects.
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Assign a new status to a specific item.
Status status() const
Return the current Status.
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
ResKind kind() const
The ResObjects kind.
bool installedEmpty() const
Simple ResStatus backup stack.
bool lock(const PoolItem &pi_r, Causer causer_r)
highlevel set locked.
bool transact(const PoolItem &pi_r, Causer causer_r)
highevel set transact (force unlock).
bool forEach(TIter begin_r, TIter end_r, Action action_r, Causer causer_r)
Highlevel action on range of items.
bool setTransact(const PoolItem &pi_r, bool yesno_r, Causer causer_r)
lowlevel ResStatus::setTransact
bool unsetNonMultiTransact(const PoolItem &pi_r, Causer causer_r)
highlevel remove transact from non-multiversion packages.
bool unsetMultiTransact(const PoolItem &pi_r, Causer causer_r)
highlevel remove transact from multiversion packages.
bool setTransactTrue(const PoolItem &pi_r, Causer causer_r)
lowlevel ResStatus::setTransact(true).
bool setTransactFalse(const PoolItem &pi_r, Causer causer_r)
lowlevel ResStatus::setTransact(false).
bool unlock(const PoolItem &pi_r, Causer causer_r)
highlevel unlock (also unsets transact).
ResStatus & backup(ResStatus &status_r)
Backup status.
std::vector< resstatus::StatusBackup > _backup
ResStatus::TransactByValue Causer
ResStatus & operator()(ResStatus &status_r)
Backup status.
ResStatus & backup(const PoolItem &pi_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
ResStatus & operator()(const PoolItem &pi_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool restore()
Restore all status.
bool setLock(const PoolItem &pi_r, bool yesno_r, Causer causer_r)
lowlevel ResStatus::setLock
bool(StatusBackup::* Action)(const PoolItem &, Causer)
Highlevel action.
bool isPseudoInstalled(ResKind kind_r)
Those are denoted to be installed, if the solver verifies them as being satisfied.
Status
UI status Status values calculated by Selectable.
Easy-to use interface to the ZYPP dependency resolver.
Solvable satSolvable() const
Return the corresponding sat::Solvable.
bool multiversionInstall() const
Selectable implementation.
PoolItem installedObj() const
Installed object (transacting ot highest version).
installed_iterator installedEnd() const
bool allInstalledLocked() const
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r)
available_iterator availableBegin() const
installed_iterator installedBegin() const
available_iterator availableEnd() const
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r)
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
PoolItem candidateObj() const
Best among available objects.
Status pickStatus(const PoolItem &pi_r) const
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r)
Set a userCandidate (out of available objects).
SelectableTraits::available_const_iterator available_const_iterator
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
bool allCandidatesLocked() const
bool hasCandidateOnly() const
bool hasInstalled() const
bool resetTransactingCandidates()
ResStatus::TransactByValue causer
bool hasInstalledOnly() const
Selectable::Impl::available_const_iterator available_const_iterator
const Selectable::Impl & _impl
StatusHelper(const Selectable::Impl &impl, ResStatus::TransactByValue causer_r)
bool hasCandidate() const
#define for_(IT, BEG, END)
Convenient for-loops using iterator.