#include <Patch.h>
Public Types | |
enum | Category { CAT_OTHER, CAT_YAST, CAT_SECURITY, CAT_RECOMMENDED, CAT_OPTIONAL, CAT_DOCUMENT } |
enum | InteractiveFlag { NoFlags = 0x0000, Reboot = 0x0001, Message = 0x0002, License = 0x0004 } |
Flags defining if and why this patch is interactive. More... | |
typedef Patch | Self |
typedef ResTraits< Self > | TraitsType |
typedef TraitsType::PtrType | Ptr |
typedef TraitsType::constPtrType | constPtr |
typedef sat::SolvableSet | Contents |
Public Member Functions | |
ZYPP_DECLARE_FLAGS (InteractiveFlags, InteractiveFlag) | |
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. | |
InteractiveFlags | interactiveFlags () const |
Get the InteractiveFlags of this Patch. | |
bool | interactiveWhenIgnoring (InteractiveFlags flags_r=NoFlags) const |
Is the patch still interactive when ignoring this flags? | |
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. | |
Classes | |
class | ReferenceIterator |
Query class for Patch issue references like bugzilla and security issues the patch is supposed to fix. More... |
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 36 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] |
zypp::Patch::ZYPP_DECLARE_FLAGS | ( | InteractiveFlags | , | |
InteractiveFlag | ||||
) |
Date zypp::Patch::timestamp | ( | ) | const [inline] |
Issue date time.
For now it is the same as buildtime().
Definition at line 73 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 interactiveFlags().
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 interactiveFlags().
Patch::InteractiveFlags zypp::Patch::interactiveFlags | ( | ) | const |
Get the InteractiveFlags of this Patch.
Definition at line 123 of file Patch.cc.
References zypp::sat::SolvableSet::begin(), contents(), zypp::sat::SolvableSet::end(), for_, License, zypp::ResObject::licenseToConfirm(), zypp::ResObject::makeResObject, Message, message(), NoFlags, Reboot, and rebootSuggested().
Referenced by interactiveWhenIgnoring().
bool zypp::Patch::interactiveWhenIgnoring | ( | InteractiveFlags | flags_r = NoFlags |
) | const |
Is the patch still interactive when ignoring this flags?
Definition at line 147 of file Patch.cc.
References interactiveFlags().
Referenced by interactive().
bool zypp::Patch::interactive | ( | ) | const |
Is the patch installation interactive? (does it need user input?).
For security reasons patches requiring a reboot are not installed in an unattended mode. They are considered to be interactive
so the user gets informed about the need for reboot. ignoreRebootFlag_r may be used to explicitly turn off this behavior and include those patches (unless they actually contain interactive components as well, like messages or licenses).
Definition at line 159 of file Patch.cc.
References interactiveWhenIgnoring().
Patch::Contents zypp::Patch::contents | ( | ) | const |
The collection of packages associated with this patch.
Definition at line 164 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 interactiveFlags().
Patch::ReferenceIterator zypp::Patch::referencesBegin | ( | ) | const [inline] |
Get an iterator to the beginning of the patch references.
Definition at line 217 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.