libzypp  10.5.0
zypp::Patch Class Reference

Class representing a patch. More...

#include <Patch.h>

Inheritance diagram for zypp::Patch:

List of all members.

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
}
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< SelfTraitsType
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.

Detailed Description

Class representing a patch.

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.


Member Typedef Documentation

Reimplemented from zypp::ResObject.

Definition at line 39 of file Patch.h.

Reimplemented from zypp::ResObject.

Definition at line 40 of file Patch.h.

Reimplemented from zypp::ResObject.

Definition at line 41 of file Patch.h.

Reimplemented from zypp::ResObject.

Definition at line 42 of file Patch.h.

Definition at line 45 of file Patch.h.


Member Enumeration Documentation

Enumerator:
CAT_OTHER 
CAT_YAST 
CAT_SECURITY 
CAT_RECOMMENDED 
CAT_OPTIONAL 
CAT_DOCUMENT 

Definition at line 47 of file Patch.h.

Flags defining if and why this patch is interactive.

Enumerator:
NoFlags 
Reboot 
Message 
License 

Definition at line 60 of file Patch.h.


Constructor & Destructor Documentation

zypp::Patch::Patch ( const sat::Solvable solvable_r) [protected]

Ctor.

Definition at line 31 of file Patch.cc.

zypp::Patch::~Patch ( ) [protected, virtual]

Dtor.

Definition at line 40 of file Patch.cc.


Member Function Documentation

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.

std::string zypp::Patch::category ( ) const

Patch category (recommended, security,...)

Definition at line 111 of file Patch.cc.

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.

bool zypp::Patch::rebootSuggested ( ) const

Does the system need to reboot to finish the update process?

Definition at line 114 of file Patch.cc.

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.

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.

std::string zypp::Patch::message ( const Locale lang_r = Locale()) const

Information or warning to be displayed to the user.

Definition at line 108 of file Patch.cc.

Patch::InteractiveFlags zypp::Patch::interactiveFlags ( ) const

Get the InteractiveFlags of this Patch.

Definition at line 123 of file Patch.cc.

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.

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.

Patch::Contents zypp::Patch::contents ( ) const

The collection of packages associated with this patch.

Definition at line 164 of file Patch.cc.

Patch::ReferenceIterator zypp::Patch::referencesBegin ( ) const [inline]

Get an iterator to the beginning of the patch references.

See also:
Patch::ReferenceIterator

Definition at line 217 of file Patch.h.

Patch::ReferenceIterator zypp::Patch::referencesEnd ( ) const [inline]

Get an iterator to the end of the patch references.

See also:
Patch::ReferenceIterator

Definition at line 220 of file Patch.h.


Friends And Related Function Documentation

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.


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