#include <Patch.h>
Classes | |
class | ReferenceIterator |
Query class for Patch issue references like bugzilla and security issues the patch is supposed to fix. More... | |
Public Types | |
enum | Category { CAT_OTHER, CAT_YAST, CAT_SECURITY, CAT_RECOMMENDED, CAT_OPTIONAL, CAT_DOCUMENT } |
typedef Patch | Self |
typedef ResTraits< Self > | TraitsType |
typedef TraitsType::PtrType | Ptr |
typedef TraitsType::constPtrType | constPtr |
typedef sat::SolvableSet | Contents |
Public Member Functions | |
Date | timestamp () const |
Issue date time. | |
std::string | category () const |
Patch category (recommended, security,. | |
Category | categoryEnum () const |
Patch category as enum of wellknown categories. | |
bool | rebootSuggested () const |
Does the system need to reboot to finish the update process? | |
bool | restartSuggested () const |
Does the patch affect the package manager itself? restart is suggested then. | |
bool | reloginSuggested () const |
Does the patch needs the user to relogin to take effect? relogin is suggested then. | |
std::string | message (const Locale &lang_r=Locale()) const |
Information or warning to be displayed to the user. | |
bool | interactive () const |
Is the patch installation interactive? (does it need user input?). | |
Contents | contents () const |
The collection of packages associated with this patch. | |
ReferenceIterator | referencesBegin () const |
Get an iterator to the beginning of the patch references. | |
ReferenceIterator | referencesEnd () const |
Get an iterator to the end of the patch references. | |
Protected Member Functions | |
Patch (const sat::Solvable &solvable_r) | |
Ctor. | |
virtual | ~Patch () |
Dtor. | |
Friends | |
Ptr | make (const sat::Solvable &solvable_r) |
Directly create a certain kind of ResObject from sat::Solvable. |
A patch represents a specific problem that can be fixed by pulling in the patch dependencies.
Patches can be marked for installation but their installation is a no-op.
Definition at line 35 of file Patch.h.
typedef Patch zypp::Patch::Self |
typedef ResTraits<Self> zypp::Patch::TraitsType |
typedef TraitsType::PtrType zypp::Patch::Ptr |
zypp::Patch::Patch | ( | const sat::Solvable & | solvable_r | ) | [protected] |
Date zypp::Patch::timestamp | ( | ) | const [inline] |
Issue date time.
For now it is the same as buildtime().
Definition at line 60 of file Patch.h.
References zypp::ResObject::buildtime().
std::string zypp::Patch::category | ( | ) | const |
Patch category (recommended, security,.
..)
Definition at line 111 of file Patch.cc.
References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::patchcategory.
Referenced by categoryEnum().
Patch::Category zypp::Patch::categoryEnum | ( | ) | const |
Patch category as enum of wellknown categories.
Unknown values are mapped to CAT_OTHER.
Definition at line 49 of file Patch.cc.
References CAT_DOCUMENT, CAT_OPTIONAL, CAT_OTHER, CAT_RECOMMENDED, CAT_SECURITY, CAT_YAST, category(), and zypp::str::compareCI().
bool zypp::Patch::rebootSuggested | ( | ) | const |
Does the system need to reboot to finish the update process?
Definition at line 114 of file Patch.cc.
References zypp::sat::Solvable::lookupBoolAttribute(), and zypp::sat::SolvAttr::rebootSuggested.
Referenced by interactive().
bool zypp::Patch::restartSuggested | ( | ) | const |
Does the patch affect the package manager itself? restart is suggested then.
Definition at line 117 of file Patch.cc.
References zypp::sat::Solvable::lookupBoolAttribute(), and zypp::sat::SolvAttr::restartSuggested.
bool zypp::Patch::reloginSuggested | ( | ) | const |
Does the patch needs the user to relogin to take effect? relogin is suggested then.
Definition at line 120 of file Patch.cc.
References zypp::sat::Solvable::lookupBoolAttribute(), and zypp::sat::SolvAttr::reloginSuggested.
Information or warning to be displayed to the user.
Definition at line 108 of file Patch.cc.
References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::message.
Referenced by interactive().
bool zypp::Patch::interactive | ( | ) | const |
Is the patch installation interactive? (does it need user input?).
Definition at line 124 of file Patch.cc.
References zypp::sat::SolvableSet::begin(), contents(), zypp::sat::SolvableSet::end(), for_, zypp::ResObject::licenseToConfirm(), message(), and rebootSuggested().
Patch::Contents zypp::Patch::contents | ( | ) | const |
The collection of packages associated with this patch.
Definition at line 145 of file Patch.cc.
References zypp::Resolvable::arch(), zypp::sat::LookupAttr::begin(), zypp::Resolvable::edition(), zypp::sat::LookupAttr::end(), zypp::Rel::EQ, for_, zypp::sat::SolvableSet::get(), zypp::Rel::GT, zypp::Resolvable::name(), zypp::ResKind::package, zypp::Resolvable::satSolvable(), zypp::sat::SolvAttr::updateCollection, zypp::sat::SolvAttr::updateCollectionArch, zypp::sat::SolvAttr::updateCollectionEvr, zypp::sat::SolvAttr::updateCollectionName, and WAR.
Referenced by interactive().
Patch::ReferenceIterator zypp::Patch::referencesBegin | ( | ) | const [inline] |
Get an iterator to the beginning of the patch references.
Definition at line 186 of file Patch.h.
References zypp::Resolvable::satSolvable().
Patch::ReferenceIterator zypp::Patch::referencesEnd | ( | ) | const [inline] |
Ptr make | ( | const sat::Solvable & | solvable_r | ) | [friend] |
Directly create a certain kind of ResObject from sat::Solvable.
If the sat::Solvables kind is not appropriate, a NULL pointer is returned.
sat::Solvable s; ResObject::Ptr p( makeResObject( s ) ); ResObject::Ptr q( make<ResObject>( s ) ); Package::Ptr pkg( make<Package>( s ) );
Definition at line 236 of file ResObject.h.