12#ifndef ZYPP_UI_SELECTABLEIMPL_H
13#define ZYPP_UI_SELECTABLEIMPL_H
60 template <
class TIterator>
62 const std::string & name_r,
69 for_( it, begin_r, end_r )
71 if ( it->status().isInstalled() )
88 const std::string &
name()
const
133 if ( pi.isBlacklisted() )
135 if ( pi.repository() == repo_r )
169 if ( defaultCand->arch() !=
installed->arch()
170 && ! ( defaultCand->arch() == Arch_noarch ||
installed->arch() == Arch_noarch ) )
174 if ( defaultCand->edition() <=
installed->edition() )
184 bool blacklistedOk =
false;
187 if ( !blacklistedOk && pi.isBlacklisted() )
191 blacklistedOk =
true;
218 if ( identical( *it, rhs ) )
232 if ( identical( *it, rhs ) )
250 std::vector<std::string> ret;
254 if ( not ret.empty() )
334 if ( pi.isBlacklisted() )
343 if ( not pi.isBlacklisted() )
345 if ( pi.isRetracted() )
354 if ( pi.isRetracted() )
363 if ( not pi.isBlacklisted() )
388 if ( pi.multiversionInstall() )
441 if ( pi.status().isLocked() )
446 if ( pi.status().isLocked() )
457 if ( pi.status().transacts() )
467 if ( pi.status().transacts() )
478 bool solver_allowVendorChange(
ResPool::instance().resolver().allowVendorChange() );
485 if ( ipi.arch() == api.arch() || ipi.arch() == Arch_noarch || api.arch() == Arch_noarch )
487 if ( ! solver_allowVendorChange )
491 else if ( ! sameArch )
512 if ( ! pi.status().isLocked() )
522 if ( ! pi.status().isLocked() )
558 str <<
" (I 0) {}" << endl <<
" ";
570 str <<
" " << t <<
" " << pi << endl;
577 str <<
"(A 0) {}" << endl <<
" ";
589 t = pi == up ?
'C' :
'c';
595 str <<
" " << t <<
" " << pi << endl;
614 t = pi == up ?
'C' :
'c';
620 str <<
" " << t <<
" " << pi <<
"\t" << obj.
pickStatus( pi ) << endl;
Access to the sat-pools string space.
Iterable< TIterator > makeIterable(TIterator &&begin_r, TIterator &&end_r)
convenient construction.
Combining sat::Solvable and ResStatus.
bool isRelevant() const
Returns true if the solvable is relevant which means e.g.
bool isBroken() const
Whether a relevant items requirements are broken.
ResStatus & status() const
Returns the current status.
bool isSatisfied() const
Whether a relevant items requirements are met.
bool isUndetermined() const
No validation is performed for packages.
static const ResKind package
static ResPool instance()
Singleton ctor.
bool isLicenceConfirmed() const
void setLicenceConfirmed(bool toVal_r=true)
static const VendorAttr & instance()
(Pseudo)Singleton, mapped to the current Target::vendorAttr settings or to noTargetInstance.
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
SelectableTraits::picklist_size_type picklist_size_type
SelectableTraits::picklist_iterator picklist_iterator
String related utilities and Regular expression matching.
Status
UI status Status values calculated by Selectable.
Easy-to use interface to the ZYPP dependency resolver.
bool isBlacklisted() const
AvailableItemSet::size_type available_size_type
std::set< PoolItem, AVOrder > AvailableItemSet
AvailableItemSet::iterator available_iterator
AvailableItemSet::const_iterator installed_const_iterator
std::vector< PoolItem > PickList
AvailableItemSet::iterator installed_iterator
AvailableItemSet::const_iterator available_const_iterator
AvailableItemSet::size_type installed_size_type
std::set< PoolItem, IOrder > InstalledItemSet
Selectable implementation.
PoolItem installedObj() const
Installed object (transacting ot highest version).
PoolItem theObj() const
Best among all objects.
installed_iterator installedEnd() const
SelectableTraits::AvailableItemSet AvailableItemSet
bool allInstalledLocked() const
PoolItem transactingCandidate() const
SelectableTraits::installed_const_iterator installed_const_iterator
bool availableEmpty() const
PoolItem transactingInstalled() const
PoolItem _candidate
The object selected by setCandidateObj() method.
SelectableTraits::installed_iterator installed_iterator
SelectableTraits::InstalledItemSet InstalledItemSet
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r)
const std::string & name() const
bool picklistEmpty() const
available_iterator availableBegin() const
bool isUnmaintained() const
SelectableTraits::PickList PickList
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
installed_iterator installedBegin() const
SelectableTraits::available_const_iterator available_const_iterator
bool installedEmpty() const
SelectableTraits::installed_size_type installed_size_type
PoolItem identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
picklist_iterator picklistBegin() const
available_iterator availableEnd() const
SelectableTraits::available_iterator available_iterator
InstalledItemSet _installedItems
std::vector< std::string > supersededBy() const
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
AvailableItemSet _availableItems
Iterable< installed_iterator > installed() const
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
picklist_size_type picklistSize() const
bool multiversionInstall() const
Iterable< available_iterator > available() const
PoolItem identicalInstalledObj(const PoolItem &rhs) const
\Return an installed Object with the same content as rhs.
bool hasPtfInstalled() const
SelectableTraits::available_size_type available_size_type
picklist_iterator picklistEnd() const
PoolItem defaultCandidate() const
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r)
scoped_ptr< PickList > _picklistPtr
lazy initialized picklist
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
bool hasBlacklistedInstalled() const
PoolItem candidateObj() const
Best among available objects.
Status pickStatus(const PoolItem &pi_r) const
std::ostream & dumpOn(std::ostream &str, const Selectable::Impl &obj)
Stream output.
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
std::ostream & operator<<(std::ostream &str, const Selectable::Impl &obj)
Stream output.
Impl(const ResKind &kind_r, const std::string &name_r, TIterator begin_r, TIterator end_r)
void setLicenceConfirmed(bool val_r)
Set LicenceConfirmed bit.
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r)
Set a userCandidate (out of available objects).
bool isUndetermined() const
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
bool hasBlacklisted() const
bool identIsAutoInstalled() const
Whether this ident is flagged as AutoInstalled.
bool hasRetracted() const
available_size_type availableSize() const
bool hasRetractedInstalled() const
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
bool hasLocks() const
True if it includes locked items (don't mix this with the locked status).
installed_size_type installedSize() const
bool allCandidatesLocked() const
const PickList & picklist() const
#define for_(IT, BEG, END)
Convenient for-loops using iterator.