libzypp  17.3.0
zypp::ui::Selectable Class Reference

Collects PoolItems of same kind and name. More...

#include <Selectable.h>

Inheritance diagram for zypp::ui::Selectable:

Classes

struct  Impl
 Selectable implementation. More...
 

Public Types

typedef intrusive_ptr< SelectablePtr
 
typedef intrusive_ptr< const SelectableconstPtr
 
typedef SelectableTraits::available_iterator available_iterator
 Iterates over ResObject::constPtr. More...
 
typedef SelectableTraits::available_size_type available_size_type
 
typedef SelectableTraits::installed_iterator installed_iterator
 
typedef SelectableTraits::installed_size_type installed_size_type
 
typedef SelectableTraits::picklist_iterator picklist_iterator
 
typedef SelectableTraits::picklist_size_type picklist_size_type
 
typedef shared_ptr< ImplImpl_Ptr
 

Public Member Functions

IdString ident () const
 The identifier. More...
 
ResKind kind () const
 The ResObjects kind. More...
 
const std::string & name () const
 The ResObjects name. More...
 
PoolItem installedObj () const
 The last Installed object. More...
 
PoolItem candidateObj () const
 The 'best' or 'most interesting' among all available objects. More...
 
PoolItem candidateObjFrom (Repository repo_r) const
 The best candidate provided by a specific Repository, if there is one. More...
 
PoolItem updateCandidateObj () const
 The best candidate for update, if there is one. More...
 
PoolItem highestAvailableVersionObj () const
 Simply the highest available version, ignoring priorities and policies. More...
 
bool identIsAutoInstalled () const
 Whether this ident is flagged as AutoInstalled. More...
 
bool identicalAvailable (const PoolItem &rhs) const
 True if rhs is installed and one with the same content is available. More...
 
bool identicalInstalled (const PoolItem &rhs) const
 True if rhs has the same content as an installed one. More...
 
bool identicalInstalledCandidate () const
 True if the candidateObj is installed (same content). More...
 
bool identicalInstalledUpdateCandidate () const
 True if the updateCandidateObj is installed (same content). More...
 
PoolItem identicalAvailableObj (const PoolItem &rhs) const
 Return an available Object with the same content as rhs. More...
 
PoolItem identicalInstalledObj (const PoolItem &rhs) const
 an installed Object with the same content as rhs. More...
 
template<class TRes >
ResTraits< TRes >::constPtrType installedAsKind () const
 Return the installedObj resolvable casted to a specific kind. More...
 
template<class TRes >
ResTraits< TRes >::constPtrType candidateAsKind () const
 Return the candidateObj resolvable casted to a specific kind. More...
 
PoolItem setCandidate (const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 Set a candidate (out of available objects). More...
 
PoolItem setCandidate (ResObject::constPtr newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 
bool setOnSystem (const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 Arrange the specified candidate (out of available objects) to be on system after commit. More...
 
PoolItem theObj () const
 An object you could use as pars pro toto. More...
 
bool isUnmaintained () const
 True if this package has no replacement from the available repositories. More...
 
 Selectable (Impl_Ptr pimpl_r)
 Default ctor. More...
 
Available objects iterators.

Oredered according to solver policy.

'Best' first.

bool availableEmpty () const
 
available_size_type availableSize () const
 
available_iterator availableBegin () const
 
available_iterator availableEnd () const
 
Iterable< available_iteratoravailable () const
 
Installed objects iterators.

Ordered by install time.

Latest first.

bool installedEmpty () const
 
installed_size_type installedSize () const
 
installed_iterator installedBegin () const
 
installed_iterator installedEnd () const
 
Iterable< installed_iteratorinstalled () const
 
picklist iterators.

This is basically the available items list prepended by those installed items, that are nolonger identicalAvailable.

bool picklistEmpty () const
 
picklist_size_type picklistSize () const
 
picklist_iterator picklistBegin () const
 
picklist_iterator picklistEnd () const
 
Iterable< picklist_iteratorpicklist () const
 
Query for objects within this Selectable.
bool hasObject () const
 True if either installed or candidate object is present. More...
 
bool hasInstalledObj () const
 True if installed object is present. More...
 
bool hasCandidateObj () const
 True if candidate object is present. More...
 
bool hasBothObjects () const
 True if installed and candidate object is present. More...
 
bool hasInstalledObjOnly () const
 True if installed object is present but no candidate. More...
 
bool hasCandidateObjOnly () const
 True if candidate object is present but no installed. More...
 
Multiversion install.

Using pickInstall or pickDelete with non-multiversionInstall items is possible, but additional constraints will apply.

E.g. selecting one item for install will deselect any other.

bool multiversionInstall () const
 Whether at least one of the available packages has multiversionInstall set. More...
 
bool pickInstall (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
 Select a specific available item for installation. More...
 
bool pickNoInstall (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 Deselect a specific available item from installation. More...
 
bool pickDelete (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
 Select a specific installed item for deletion. More...
 
bool pickNoDelete (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 Deselect a specific installed item from deletion. More...
 
Status pickStatus (const PoolItem &pi_r) const
 Compute the ui::Status for an individual PoolItem. More...
 
bool setPickStatus (const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 Assign a new status to a specific item. More...
 
Classification of available patches (pseudo installed items).

A patch is either not relevant, satisfied or broken.

The same applies to other pseudo installed kinds.

See also
traits::isPseudoInstalled
bool isUndetermined () const
 Returns true for packages, because packages are not classified by the solver. More...
 
bool isRelevant () const
 Returns true if the patch is relevant which means that at least one package of the patch is installed. More...
 
bool isSatisfied () const
 Whether a relevant patchs requirements are met. More...
 
bool isBroken () const
 Whether a relevant patchs requirements are broken. More...
 
bool isNeeded () const
 This includes unlocked broken patches, as well as those already selected to be installed. More...
 
bool isUnwanted () const
 Broken (needed) but locked patches. More...
 
Special inteface for Y2UI.
Note
This interface acts on ResStatus::USER level. The Status enum, and allowed state transitions are tightly related to the Y2UI.
Status status () const
 Return the current Status. More...
 
bool setStatus (Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 Try to set a new Status. More...
 
ResStatus::TransactByValue modifiedBy () const
 Return who caused the modification. More...
 
bool hasLicenceConfirmed () const
 Return value of LicenceConfirmed bit. More...
 
void setLicenceConfirmed (bool val_r=true)
 Set LicenceConfirmed bit. More...
 
- Public Member Functions inherited from zypp::base::ReferenceCounted
 ReferenceCounted ()
 Default ctor. More...
 
 ReferenceCounted (const ReferenceCounted &rhs)
 Copy ctor. More...
 
virtual ~ReferenceCounted ()
 Dtor. More...
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment. More...
 
unsigned refCount () const
 Return reference counter value. More...
 
void ref () const
 Add a reference. More...
 
void unref () const
 Release a reference. More...
 

Static Public Member Functions

Static ctor substitues picking the item from the pool.
item = Selectable::get( "amarok ); // package amamrok
item = Selectable::get( ResKind::patch, "amarok ); // patch amamrok
item = Selectable::get( IdString( "patch:amarok" ); // patch amamrok
static Ptr get (const pool::ByIdent &ident_r)
 Get the Selctable. More...
 
static Ptr get (IdString ident_r)
 Get the Selctable by it's sat-identifyer. More...
 
static Ptr get (ResKind kind_r, const std::string &name_r)
 Get the Selctable by kind and name. More...
 
static Ptr get (const std::string &name_r)
 Get the Package Selctable by name. More...
 
static Ptr get (const sat::Solvable &solv_r)
 Get the Selctable containing a specific sat::Solvable. More...
 
static Ptr get (const ResObject::constPtr &resolvable_r)
 Get the Selctable containing a specific ResObject. More...
 
static Ptr get (const PoolItem &pi_r)
 Get the Selctable containing a specific PoolItem. More...
 
- Static Public Member Functions inherited from zypp::base::ReferenceCounted
static void add_ref (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference. More...
 
static void release (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference. More...
 

Private Member Functions

 ~Selectable ()
 Dtor. More...
 

Private Attributes

RW_pointer< Impl_pimpl
 Pointer to implementation. More...
 

Friends

std::ostream & operator<< (std::ostream &str, const Selectable &obj)
 
std::ostream & dumpOn (std::ostream &str, const Selectable &obj)
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Selectable &obj)
 
std::ostream & dumpOn (std::ostream &str, const Selectable &obj)
 

Query and maip objects fate in case of commit.

enum  Fate { TO_DELETE = -1, UNMODIFIED = 0, TO_INSTALL = 1 }
 
Fate fate () const
 
bool unmodified () const
 True if neither to delete or to install. More...
 
bool locked () const
 True if locked (subclass of unmodified). More...
 
bool toModify () const
 True if either to delete or to install. More...
 
bool toDelete () const
 True if to delete. More...
 
bool toInstall () const
 True if to install. More...
 
bool onSystem () const
 True if would be on system after commit. More...
 
bool offSystem () const
 True if would be off system after commit. More...
 
bool setFate (Fate fate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
 
bool setToInstall (ResStatus::TransactByValue causer_r=ResStatus::USER)
 Set the item to be installed (new- or re-install). More...
 
bool setInstalled (ResStatus::TransactByValue causer_r=ResStatus::USER)
 Take care the item gets installed if it is not. More...
 
bool setUpToDate (ResStatus::TransactByValue causer_r=ResStatus::USER)
 Take care the item gets installed if it is not, or is older. More...
 
bool setToDelete (ResStatus::TransactByValue causer_r=ResStatus::USER)
 Set the item to be deleted (must be installed). More...
 
bool setDeleted (ResStatus::TransactByValue causer_r=ResStatus::USER)
 Take care the item gets deleted if it is installed. More...
 
bool unset (ResStatus::TransactByValue causer_r=ResStatus::USER)
 Set the item to stay unmodified. More...
 

Additional Inherited Members

- Protected Member Functions inherited from zypp::base::ReferenceCounted
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize std::ostream & operator<<. More...
 
virtual void ref_to (unsigned) const
 Trigger derived classes after refCount was increased. More...
 
virtual void unref_to (unsigned) const
 Trigger derived classes after refCount was decreased. More...
 

Detailed Description

Collects PoolItems of same kind and name.

Selectable is a status wrapper. The ui::Status is calculated from (and transated to) PoolItems individual ResStatus values.

Available objects are sorted according the solver policies, 'best' packages first (e.g. by repository priority, then Arch, then Edition).

Installed objects are sorted according the installation date, newer install time first.

Definition at line 51 of file Selectable.h.

Member Typedef Documentation

◆ Ptr

Definition at line 57 of file Selectable.h.

◆ constPtr

Definition at line 58 of file Selectable.h.

◆ available_iterator

◆ available_size_type

◆ installed_iterator

◆ installed_size_type

◆ picklist_iterator

◆ picklist_size_type

◆ Impl_Ptr

Definition at line 507 of file Selectable.h.

Member Enumeration Documentation

◆ Fate

Enumerator
TO_DELETE 
UNMODIFIED 
TO_INSTALL 

Definition at line 416 of file Selectable.h.

Constructor & Destructor Documentation

◆ Selectable()

zypp::ui::Selectable::Selectable ( Impl_Ptr  pimpl_r)

Default ctor.

Definition at line 36 of file Selectable.cc.

◆ ~Selectable()

zypp::ui::Selectable::~Selectable ( )
private

Dtor.

Definition at line 45 of file Selectable.cc.

Member Function Documentation

◆ get() [1/7]

Selectable::Ptr zypp::ui::Selectable::get ( const pool::ByIdent ident_r)
static

Get the Selctable.

Definition at line 28 of file Selectable.cc.

◆ get() [2/7]

static Ptr zypp::ui::Selectable::get ( IdString  ident_r)
inlinestatic

Get the Selctable by it's sat-identifyer.

Definition at line 84 of file Selectable.h.

◆ get() [3/7]

static Ptr zypp::ui::Selectable::get ( ResKind  kind_r,
const std::string &  name_r 
)
inlinestatic

Get the Selctable by kind and name.

Definition at line 88 of file Selectable.h.

◆ get() [4/7]

static Ptr zypp::ui::Selectable::get ( const std::string &  name_r)
inlinestatic

Get the Package Selctable by name.

Definition at line 92 of file Selectable.h.

◆ get() [5/7]

static Ptr zypp::ui::Selectable::get ( const sat::Solvable solv_r)
inlinestatic

Get the Selctable containing a specific sat::Solvable.

Definition at line 96 of file Selectable.h.

◆ get() [6/7]

static Ptr zypp::ui::Selectable::get ( const ResObject::constPtr resolvable_r)
inlinestatic

Get the Selctable containing a specific ResObject.

Definition at line 100 of file Selectable.h.

◆ get() [7/7]

static Ptr zypp::ui::Selectable::get ( const PoolItem pi_r)
inlinestatic

Get the Selctable containing a specific PoolItem.

Definition at line 104 of file Selectable.h.

◆ ident()

IdString zypp::ui::Selectable::ident ( ) const

The identifier.

This is the solvables name, except for packages and source packes, prefixed by it's kind.

See also
sat::Solvable.

Definition at line 55 of file Selectable.cc.

◆ kind()

ResKind zypp::ui::Selectable::kind ( ) const

The ResObjects kind.

Definition at line 58 of file Selectable.cc.

◆ name()

const std::string & zypp::ui::Selectable::name ( ) const

The ResObjects name.

Definition at line 61 of file Selectable.cc.

◆ installedObj()

PoolItem zypp::ui::Selectable::installedObj ( ) const

The last Installed object.

Definition at line 70 of file Selectable.cc.

◆ candidateObj()

PoolItem zypp::ui::Selectable::candidateObj ( ) const

The 'best' or 'most interesting' among all available objects.

One that is, or is likely to be, chosen for installation, unless it violated any solver policy (see updateCandidateObj).

Definition at line 73 of file Selectable.cc.

◆ candidateObjFrom()

PoolItem zypp::ui::Selectable::candidateObjFrom ( Repository  repo_r) const

The best candidate provided by a specific Repository, if there is one.

In contrary to candidateObj, this may return no item even if there are available objects. This simply means the Repository does not provide this object.

Definition at line 76 of file Selectable.cc.

◆ updateCandidateObj()

PoolItem zypp::ui::Selectable::updateCandidateObj ( ) const

The best candidate for update, if there is one.

In contrary to candidateObj, this may return no item even if there are available objects. This simply means the best object is already installed, and all available objects violate at least one update policy.

Definition at line 79 of file Selectable.cc.

◆ highestAvailableVersionObj()

PoolItem zypp::ui::Selectable::highestAvailableVersionObj ( ) const

Simply the highest available version, ignoring priorities and policies.

It's doubtful whether solely looking at the version makes a good candidate, but apps ask for it. Beware that different vendors may use different (uncomparable) version schemata.

Definition at line 82 of file Selectable.cc.

◆ identIsAutoInstalled()

bool zypp::ui::Selectable::identIsAutoInstalled ( ) const

Whether this ident is flagged as AutoInstalled.

Definition at line 85 of file Selectable.cc.

◆ identicalAvailable()

bool zypp::ui::Selectable::identicalAvailable ( const PoolItem rhs) const

True if rhs is installed and one with the same content is available.

Basically the same name, edition, arch, vendor and buildtime.

See also
sat::Solvable::identical

Definition at line 88 of file Selectable.cc.

◆ identicalInstalled()

bool zypp::ui::Selectable::identicalInstalled ( const PoolItem rhs) const

True if rhs has the same content as an installed one.

Basically the same name, edition, arch, vendor and buildtime.

See also
sat::Solvable::identical

Definition at line 91 of file Selectable.cc.

◆ identicalInstalledCandidate()

bool zypp::ui::Selectable::identicalInstalledCandidate ( ) const
inline

True if the candidateObj is installed (same content).

See also
identicalInstalled.

Definition at line 171 of file Selectable.h.

◆ identicalInstalledUpdateCandidate()

bool zypp::ui::Selectable::identicalInstalledUpdateCandidate ( ) const
inline

True if the updateCandidateObj is installed (same content).

See also
identicalInstalled.

Definition at line 177 of file Selectable.h.

◆ identicalAvailableObj()

PoolItem zypp::ui::Selectable::identicalAvailableObj ( const PoolItem rhs) const

Return an available Object with the same content as rhs.

Basically the same name, edition, arch, vendor and buildtime.

See also
sat::Solvable::identical

Definition at line 94 of file Selectable.cc.

◆ identicalInstalledObj()

PoolItem zypp::ui::Selectable::identicalInstalledObj ( const PoolItem rhs) const

an installed Object with the same content as rhs.

Basically the same name, edition, arch, vendor and buildtime.

See also
sat::Solvable::identical

Definition at line 97 of file Selectable.cc.

◆ installedAsKind()

template<class TRes >
ResTraits<TRes>::constPtrType zypp::ui::Selectable::installedAsKind ( ) const
inline

Return the installedObj resolvable casted to a specific kind.

Selectable mySelectable;
Package::constPtr p( mySelectable.installedAsKind<Package>() );

Definition at line 199 of file Selectable.h.

◆ candidateAsKind()

template<class TRes >
ResTraits<TRes>::constPtrType zypp::ui::Selectable::candidateAsKind ( ) const
inline

Return the candidateObj resolvable casted to a specific kind.

Selectable mySelectable;
Package::constPtr p( mySelectable.candidateAsKind<Package>() );

Definition at line 209 of file Selectable.h.

◆ setCandidate() [1/2]

PoolItem zypp::ui::Selectable::setCandidate ( const PoolItem newCandidate_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)

Set a candidate (out of available objects).

Returns
The new candidate, or NULL if choice was invalid (NULL or not among availableObjs). An invalid choice selects the default candidate. In case the causer is not ResStatus::USER the operation may also fail if there are insufficient permissions to change a transacting candidate.

Definition at line 100 of file Selectable.cc.

◆ setCandidate() [2/2]

PoolItem zypp::ui::Selectable::setCandidate ( ResObject::constPtr  newCandidate_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 103 of file Selectable.cc.

◆ setOnSystem()

bool zypp::ui::Selectable::setOnSystem ( const PoolItem newCandidate_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)

Arrange the specified candidate (out of available objects) to be on system after commit.

If the specified candidate is not already installed (identicalInstalled), and the causer_r has sufficient permisssion, then newCandidate_r is set as the new candidate (setCandidate) and selected for installation.

Returns
True if newCandidate_r is already installed or successfully selected for installation.

Definition at line 106 of file Selectable.cc.

◆ theObj()

PoolItem zypp::ui::Selectable::theObj ( ) const

An object you could use as pars pro toto.

Returns
the candidateObj, or ,if no available objects exist, the installedObj.

Definition at line 113 of file Selectable.cc.

◆ availableEmpty()

bool zypp::ui::Selectable::availableEmpty ( ) const

Definition at line 118 of file Selectable.cc.

◆ availableSize()

Selectable::available_size_type zypp::ui::Selectable::availableSize ( ) const

Definition at line 121 of file Selectable.cc.

◆ availableBegin()

Selectable::available_iterator zypp::ui::Selectable::availableBegin ( ) const

Definition at line 124 of file Selectable.cc.

◆ availableEnd()

Selectable::available_iterator zypp::ui::Selectable::availableEnd ( ) const

Definition at line 127 of file Selectable.cc.

◆ available()

Iterable<available_iterator> zypp::ui::Selectable::available ( ) const
inline

Definition at line 249 of file Selectable.h.

◆ installedEmpty()

bool zypp::ui::Selectable::installedEmpty ( ) const

Definition at line 132 of file Selectable.cc.

◆ installedSize()

Selectable::installed_size_type zypp::ui::Selectable::installedSize ( ) const

Definition at line 135 of file Selectable.cc.

◆ installedBegin()

Selectable::installed_iterator zypp::ui::Selectable::installedBegin ( ) const

Definition at line 138 of file Selectable.cc.

◆ installedEnd()

Selectable::installed_iterator zypp::ui::Selectable::installedEnd ( ) const

Definition at line 141 of file Selectable.cc.

◆ installed()

Iterable<installed_iterator> zypp::ui::Selectable::installed ( ) const
inline

Definition at line 263 of file Selectable.h.

◆ picklistEmpty()

bool zypp::ui::Selectable::picklistEmpty ( ) const

Definition at line 146 of file Selectable.cc.

◆ picklistSize()

Selectable::picklist_size_type zypp::ui::Selectable::picklistSize ( ) const

Definition at line 149 of file Selectable.cc.

◆ picklistBegin()

Selectable::picklist_iterator zypp::ui::Selectable::picklistBegin ( ) const

Definition at line 152 of file Selectable.cc.

◆ picklistEnd()

Selectable::picklist_iterator zypp::ui::Selectable::picklistEnd ( ) const

Definition at line 155 of file Selectable.cc.

◆ picklist()

Iterable<picklist_iterator> zypp::ui::Selectable::picklist ( ) const
inline

Definition at line 278 of file Selectable.h.

◆ hasObject()

bool zypp::ui::Selectable::hasObject ( ) const
inline

True if either installed or candidate object is present.

Definition at line 289 of file Selectable.h.

◆ hasInstalledObj()

bool zypp::ui::Selectable::hasInstalledObj ( ) const
inline

True if installed object is present.

Definition at line 293 of file Selectable.h.

◆ hasCandidateObj()

bool zypp::ui::Selectable::hasCandidateObj ( ) const
inline

True if candidate object is present.

Definition at line 297 of file Selectable.h.

◆ hasBothObjects()

bool zypp::ui::Selectable::hasBothObjects ( ) const
inline

True if installed and candidate object is present.

Definition at line 301 of file Selectable.h.

◆ hasInstalledObjOnly()

bool zypp::ui::Selectable::hasInstalledObjOnly ( ) const
inline

True if installed object is present but no candidate.

Definition at line 305 of file Selectable.h.

◆ hasCandidateObjOnly()

bool zypp::ui::Selectable::hasCandidateObjOnly ( ) const
inline

True if candidate object is present but no installed.

Definition at line 309 of file Selectable.h.

◆ isUnmaintained()

bool zypp::ui::Selectable::isUnmaintained ( ) const

True if this package has no replacement from the available repositories.

Definition at line 160 of file Selectable.cc.

◆ multiversionInstall()

bool zypp::ui::Selectable::multiversionInstall ( ) const

Whether at least one of the available packages has multiversionInstall set.

See also
Solvable::multiversionInstall
also ZConfig::multiversion.

Definition at line 163 of file Selectable.cc.

◆ pickInstall()

bool zypp::ui::Selectable::pickInstall ( const PoolItem pi_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER,
bool  yesno_r = true 
)

Select a specific available item for installation.

Definition at line 166 of file Selectable.cc.

◆ pickNoInstall()

bool zypp::ui::Selectable::pickNoInstall ( const PoolItem pi_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)
inline

Deselect a specific available item from installation.

Definition at line 338 of file Selectable.h.

◆ pickDelete()

bool zypp::ui::Selectable::pickDelete ( const PoolItem pi_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER,
bool  yesno_r = true 
)

Select a specific installed item for deletion.

Definition at line 169 of file Selectable.cc.

◆ pickNoDelete()

bool zypp::ui::Selectable::pickNoDelete ( const PoolItem pi_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)
inline

Deselect a specific installed item from deletion.

Definition at line 347 of file Selectable.h.

◆ pickStatus()

Status zypp::ui::Selectable::pickStatus ( const PoolItem pi_r) const

Compute the ui::Status for an individual PoolItem.

This just takes into account the item and any identical installed (or available) one.

Assume there are 3 identical 'foo-1.1 (vendor A)' items,
one 'foo-2.1 (vendor A)' and one ''foo-1.1 (vendor B)':
installed: . foo-1.1 (vendor A) -> S_KeepInstalled
available: foo-2.1 (vendor A) (repo 1) -> S_NoInst
. foo-1.1 (vendor A) (repo 1) -> S_KeepInstalled
. foo-1.1 (vendor A) (repo 2) -> S_KeepInstalled
foo-1.1 (vendor B) (repo 3) -> S_NoInst
After 'foo-1.1 (vendor A) (repo 1)' was selected to be installed:
installed: . foo-1.1 (vendor A) -> S_Update
available: foo-2.1 (vendor A) (repo 1) -> S_NoInst
I foo-1.1 (vendor A) (repo 1) -> S_Update
. foo-1.1 (vendor A) (repo 2) -> S_KeepInstalled
foo-1.1 (vendor B) (repo 3) -> S_NoInst
See also
sat::Solvable::identical

Definition at line 172 of file Selectable.cc.

◆ setPickStatus()

bool zypp::ui::Selectable::setPickStatus ( const PoolItem pi_r,
Status  state_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)

Assign a new status to a specific item.

Definition at line 175 of file Selectable.cc.

◆ isUndetermined()

bool zypp::ui::Selectable::isUndetermined ( ) const

Returns true for packages, because packages are not classified by the solver.

Definition at line 180 of file Selectable.cc.

◆ isRelevant()

bool zypp::ui::Selectable::isRelevant ( ) const

Returns true if the patch is relevant which means that at least one package of the patch is installed.

Definition at line 183 of file Selectable.cc.

◆ isSatisfied()

bool zypp::ui::Selectable::isSatisfied ( ) const

Whether a relevant patchs requirements are met.

Definition at line 186 of file Selectable.cc.

◆ isBroken()

bool zypp::ui::Selectable::isBroken ( ) const

Whether a relevant patchs requirements are broken.

Definition at line 189 of file Selectable.cc.

◆ isNeeded()

bool zypp::ui::Selectable::isNeeded ( ) const

This includes unlocked broken patches, as well as those already selected to be installed.

This is because already selected patches will be classified as satisfied. Locked but broken patches will be classified as isUnwanted.

Definition at line 192 of file Selectable.cc.

◆ isUnwanted()

bool zypp::ui::Selectable::isUnwanted ( ) const

Broken (needed) but locked patches.

Definition at line 197 of file Selectable.cc.

◆ fate()

Selectable::Fate zypp::ui::Selectable::fate ( ) const

Definition at line 212 of file Selectable.cc.

◆ unmodified()

bool zypp::ui::Selectable::unmodified ( ) const
inline

True if neither to delete or to install.

Definition at line 425 of file Selectable.h.

◆ locked()

bool zypp::ui::Selectable::locked ( ) const
inline

True if locked (subclass of unmodified).

Definition at line 429 of file Selectable.h.

◆ toModify()

bool zypp::ui::Selectable::toModify ( ) const
inline

True if either to delete or to install.

Definition at line 433 of file Selectable.h.

◆ toDelete()

bool zypp::ui::Selectable::toDelete ( ) const
inline

True if to delete.

Definition at line 437 of file Selectable.h.

◆ toInstall()

bool zypp::ui::Selectable::toInstall ( ) const
inline

True if to install.

Definition at line 441 of file Selectable.h.

◆ onSystem()

bool zypp::ui::Selectable::onSystem ( ) const
inline

True if would be on system after commit.

Definition at line 445 of file Selectable.h.

◆ offSystem()

bool zypp::ui::Selectable::offSystem ( ) const
inline

True if would be off system after commit.

Definition at line 450 of file Selectable.h.

◆ setFate()

bool zypp::ui::Selectable::setFate ( Fate  fate_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)

Definition at line 236 of file Selectable.cc.

◆ setToInstall()

bool zypp::ui::Selectable::setToInstall ( ResStatus::TransactByValue  causer_r = ResStatus::USER)
inline

Set the item to be installed (new- or re-install).

Definition at line 457 of file Selectable.h.

◆ setInstalled()

bool zypp::ui::Selectable::setInstalled ( ResStatus::TransactByValue  causer_r = ResStatus::USER)

Take care the item gets installed if it is not.

Definition at line 263 of file Selectable.cc.

◆ setUpToDate()

bool zypp::ui::Selectable::setUpToDate ( ResStatus::TransactByValue  causer_r = ResStatus::USER)

Take care the item gets installed if it is not, or is older.

Definition at line 268 of file Selectable.cc.

◆ setToDelete()

bool zypp::ui::Selectable::setToDelete ( ResStatus::TransactByValue  causer_r = ResStatus::USER)
inline

Set the item to be deleted (must be installed).

Definition at line 467 of file Selectable.h.

◆ setDeleted()

bool zypp::ui::Selectable::setDeleted ( ResStatus::TransactByValue  causer_r = ResStatus::USER)

Take care the item gets deleted if it is installed.

Definition at line 281 of file Selectable.cc.

◆ unset()

bool zypp::ui::Selectable::unset ( ResStatus::TransactByValue  causer_r = ResStatus::USER)
inline

Set the item to stay unmodified.

Definition at line 474 of file Selectable.h.

◆ status()

Status zypp::ui::Selectable::status ( ) const

Return the current Status.

Definition at line 64 of file Selectable.cc.

◆ setStatus()

bool zypp::ui::Selectable::setStatus ( Status  state_r,
ResStatus::TransactByValue  causer_r = ResStatus::USER 
)

Try to set a new Status.

Returns false if the transitions is not allowed.

Definition at line 67 of file Selectable.cc.

◆ modifiedBy()

ResStatus::TransactByValue zypp::ui::Selectable::modifiedBy ( ) const

Return who caused the modification.

Definition at line 202 of file Selectable.cc.

◆ hasLicenceConfirmed()

bool zypp::ui::Selectable::hasLicenceConfirmed ( ) const

Return value of LicenceConfirmed bit.

Definition at line 205 of file Selectable.cc.

◆ setLicenceConfirmed()

void zypp::ui::Selectable::setLicenceConfirmed ( bool  val_r = true)

Set LicenceConfirmed bit.

Definition at line 208 of file Selectable.cc.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  str,
const Selectable obj 
)
friend

Definition at line 291 of file Selectable.cc.

◆ dumpOn [1/2]

std::ostream& dumpOn ( std::ostream &  str,
const Selectable obj 
)
friend

Definition at line 294 of file Selectable.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  str,
const Selectable obj 
)
related

Stream output

Definition at line 291 of file Selectable.cc.

◆ dumpOn() [2/2]

std::ostream & dumpOn ( std::ostream &  str,
const Selectable obj 
)
related

More verbose stream output

Definition at line 294 of file Selectable.cc.

Member Data Documentation

◆ _pimpl

RW_pointer<Impl> zypp::ui::Selectable::_pimpl
private

Pointer to implementation.

Definition at line 516 of file Selectable.h.


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