Go to the documentation of this file.
12 #ifndef ZYPP_UI_SELECTABLEIMPL_H
13 #define ZYPP_UI_SELECTABLEIMPL_H
59 template <
class TIterator>
61 const std::string & name_r,
64 :
_ident( sat::Solvable::SplitIdent( kind_r, name_r ).
ident() )
68 for_( it, begin_r, end_r )
70 if ( it->status().isInstalled() )
87 const std::string &
name()
const
132 if ( pi.isRetracted() )
134 if ( pi.repository() == repo_r )
169 && ! ( defaultCand->
arch() == Arch_noarch ||
installed->arch() == Arch_noarch ) )
183 bool retractedOk =
false;
186 if ( !retractedOk && pi.isRetracted() )
324 if ( pi && pi.isRetracted() )
346 if ( pi.multiversionInstall() )
399 if ( pi.status().isLocked() )
404 if ( pi.status().isLocked() )
415 if ( pi.status().transacts() )
425 if ( pi.status().transacts() )
443 if ( ipi.arch() == api.arch() || ipi.arch() == Arch_noarch || api.arch() == Arch_noarch )
445 if ( ! solver_allowVendorChange )
449 else if ( ! sameArch )
470 if ( ! pi.status().isLocked() )
480 if ( ! pi.status().isLocked() )
516 str <<
" (I 0) {}" << endl <<
" ";
528 str <<
" " << t <<
" " << pi << endl;
535 str <<
"(A 0) {}" << endl <<
" ";
547 t = pi == up ?
'C' :
'c';
553 str <<
" " << t <<
" " << pi << endl;
572 t = pi == up ?
'C' :
'c';
578 str <<
" " << t <<
" " << pi <<
"\t" << obj.
pickStatus( pi ) << endl;
591 #endif // ZYPP_UI_SELECTABLEIMPL_H
SelectableTraits::installed_iterator installed_iterator
bool hasLocks() const
True if it includes locked items (don't mix this with the locked status).
Combining sat::Solvable and ResStatus.
available_iterator availableBegin() const
std::vector< PoolItem > PickList
Iterable< available_iterator > available() const
bool allCandidatesLocked() const
const PickList & picklist() const
bool isRelevant() const
Returns true if the solvable is relevant which means e.g.
bool identIsAutoInstalled() const
Whether this ident is flagged as AutoInstalled.
bool installedEmpty() const
PoolItem candidateObj() const
Best among available objects.
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
SelectableTraits::AvailableItemSet AvailableItemSet
bool isUndetermined() const
installed_size_type installedSize() const
bool hasRetractedInstalled() const
PoolItem installedObj() const
Installed object (transacting ot highest version).
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
std::ostream & dumpOn(std::ostream &str, const Selectable::Impl &obj)
static ResPool instance()
Singleton ctor.
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
PoolItem defaultCandidate() const
available_iterator availableEnd() const
picklist_iterator picklistBegin() const
std::set< PoolItem, IOrder > InstalledItemSet
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 identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
picklist_iterator picklistEnd() const
AvailableItemSet::iterator available_iterator
void setLicenceConfirmed(bool toVal_r=true)
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
Iterable< installed_iterator > installed() const
SelectableTraits::installed_const_iterator installed_const_iterator
SelectableTraits::InstalledItemSet InstalledItemSet
PoolItem transactingCandidate() const
Access to the sat-pools string space.
installed_iterator installedEnd() const
installed_iterator installedBegin() const
AvailableItemSet::size_type installed_size_type
bool isUnmaintained() const
SelectableTraits::available_const_iterator available_const_iterator
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
bool availableEmpty() const
const std::string & name() const
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r)
scoped_ptr< PickList > _picklistPtr
lazy initialized picklist
AvailableItemSet _availableItems
SelectableTraits::available_size_type available_size_type
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
Easy-to use interface to the ZYPP dependency resolver.
PoolItem _candidate
The object selected by setCandidateObj() method.
std::ostream & operator<<(std::ostream &str, const Selectable::Impl &obj)
SelectableTraits::picklist_size_type picklist_size_type
SelectableTraits::available_iterator available_iterator
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
std::set< PoolItem, AVOrder > AvailableItemSet
bool identical(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isLicenceConfirmed() const
bool hasRetracted() const
Status pickStatus(const PoolItem &pi_r) const
available_size_type availableSize() const
Selectable implementation.
Status
UI status Status values calculated by Selectable.
ResStatus & status() const
Returns the current status.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
bool multiversionInstall() const
PoolItem theObj() const
Best among all objects.
AvailableItemSet::const_iterator available_const_iterator
bool picklistEmpty() const
AvailableItemSet::size_type available_size_type
static const VendorAttr & instance()
(Pseudo)Singleton, mapped to the current Target::vendorAttr settings or to noTargetInstance.
AvailableItemSet::iterator installed_iterator
SelectableTraits::picklist_iterator picklist_iterator
SelectableTraits::PickList PickList
bool isSatisfied() const
Whether a relevant items requirements are met.
InstalledItemSet _installedItems
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
bool isBroken() const
Whether a relevant items requirements are broken.
SelectableTraits::installed_size_type installed_size_type
String related utilities and Regular expression matching.
picklist_size_type picklistSize() const
AvailableItemSet::const_iterator installed_const_iterator
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r)
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
PoolItem identicalInstalledObj(const PoolItem &rhs) const
\Return an installed Object with the same content as rhs.
bool isUndetermined() const
No validation is performed for packages.
Resolvable kinds. A lowercased string and used as identification. Comparison against string values is...
PoolItem transactingInstalled() const
bool allInstalledLocked() const
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r)
Set a userCandidate (out of available objects).