zypp::target::TargetImpl Class Reference

Base class for concrete Target implementations. More...

#include <TargetImpl.h>

Inheritance diagram for zypp::target::TargetImpl:

zypp::base::ReferenceCounted NonCopyable List of all members.

Public Types

typedef std::list< PoolItem_RefPoolItemList
 list of pool items
typedef std::set< PoolItem_RefPoolItemSet
 set of pool items

Public Member Functions

void getResolvablesToInsDel (const ResPool pool_r, PoolItemList &dellist_r, PoolItemList &instlist_r, PoolItemList &srclist_r) const
 Sort according to prereqs and media numbers.
 TargetImpl (const Pathname &root_r="/")
 Ctor.
virtual ~TargetImpl ()
 Dtor.
const ResStoreresolvables ()
 All resolvables in the target.
Pathname root () const
 The root set for this target.
ZYppCommitResult commit (ResPool pool_r, const ZYppCommitPolicy &policy_r)
 Commit changes in the pool.
ZYPP_DEPRECATED int commit (ResPool pool_r, unsigned int medianr, PoolItemList &errors_r, PoolItemList &remaining_r, PoolItemList &srcremaining_r, bool dry_run=false)
bool isStorageEnabled () const
 enables the storage target
void enableStorage (const Pathname &root_r)
PoolItemList commit (const PoolItemList &items_r, const ZYppCommitPolicy &policy_r, const ResPool &pool_r)
 Commit ordered changes.
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize stream output.
rpm::RpmDbrpm ()
 The RPM database.
bool providesFile (const std::string &path_str, const std::string &name_str) const
 If the package is installed and provides the file Needed to evaluate split provides during Resolver::Upgrade().
ResObject::constPtr whoOwnsFile (const std::string &path_str) const
 Return the resolvable which provides path_str (rpm -qf) return NULL if no resolvable provides this file.
bool setInstallationLogfile (const Pathname &path_r)
 Set the log file for target.

Static Public Member Functions

static TargetImpl_Ptr nullimpl ()
 Null implementation.

Protected Attributes

ResStore _store
 All resolvables provided by the target.
Pathname _root
 Path to the target.
rpm::RpmDb _rpm
 RPM database.
zypp::storage::PersistentStorage _storage
bool _storage_enabled

Static Private Attributes

static TargetImpl_Ptr _nullimpl
 Null implementation.

Friends

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

Detailed Description

Base class for concrete Target implementations.

Constructed by TargetFactory. Public access via Target interface.

Definition at line 51 of file TargetImpl.h.


Member Typedef Documentation

typedef std::list<PoolItem_Ref> zypp::target::TargetImpl::PoolItemList
 

list of pool items

Definition at line 57 of file TargetImpl.h.

typedef std::set<PoolItem_Ref> zypp::target::TargetImpl::PoolItemSet
 

set of pool items

Definition at line 60 of file TargetImpl.h.


Constructor & Destructor Documentation

zypp::target::TargetImpl::TargetImpl const Pathname root_r = "/"  ) 
 

Ctor.

Definition at line 79 of file TargetImpl.cc.

References _root, _rpm, _storage_enabled, zypp::target::rpm::RpmDb::initDatabase(), and MIL.

zypp::target::TargetImpl::~TargetImpl  )  [virtual]
 

Dtor.

Definition at line 92 of file TargetImpl.cc.

References _rpm, zypp::target::rpm::RpmDb::closeDatabase(), and MIL.


Member Function Documentation

void zypp::target::TargetImpl::getResolvablesToInsDel const ResPool  pool_r,
PoolItemList dellist_r,
PoolItemList instlist_r,
PoolItemList srclist_r
const
 

Sort according to prereqs and media numbers.

Definition at line 538 of file TargetImpl.cc.

References zypp::pool::GetResolvablesToInsDel::_toDelete, zypp::pool::GetResolvablesToInsDel::_toInstall, zypp::pool::GetResolvablesToInsDel::_toSrcinstall, and MIL.

TargetImpl_Ptr zypp::target::TargetImpl::nullimpl  )  [static]
 

Null implementation.

Definition at line 66 of file TargetImpl.cc.

References _nullimpl.

Referenced by zypp::Target::nullimpl().

const ResStore & zypp::target::TargetImpl::resolvables  ) 
 

All resolvables in the target.

Definition at line 115 of file TargetImpl.cc.

References _rpm, _store, zypp::ResStore::clear(), zypp::target::rpm::RpmDb::getPackages(), and zypp::ResStore::insert().

Pathname zypp::target::TargetImpl::root  )  const
 

The root set for this target.

Definition at line 110 of file TargetImpl.cc.

References _root.

ZYppCommitResult zypp::target::TargetImpl::commit ResPool  pool_r,
const ZYppCommitPolicy policy_r
 

Commit changes in the pool.

Definition at line 148 of file TargetImpl.cc.

References zypp::ZYppCommitPolicy::allMedia(), MIL, zypp::pool::GetResolvablesToInsDel::ORDER_BY_MEDIANR, zypp::pool::GetResolvablesToInsDel::ORDER_BY_SOURCE, and zypp::ZYppCommitPolicy::restrictToMedia().

Referenced by commit().

ZYPP_DEPRECATED int zypp::target::TargetImpl::commit ResPool  pool_r,
unsigned int  medianr,
PoolItemList errors_r,
PoolItemList remaining_r,
PoolItemList srcremaining_r,
bool  dry_run = false
[inline]
 

Definition at line 91 of file TargetImpl.h.

References zypp::ZYppCommitResult::_errors, zypp::ZYppCommitResult::_remaining, zypp::ZYppCommitResult::_result, zypp::ZYppCommitResult::_srcremaining, commit(), and zypp::ZYppCommitPolicy::restrictToMedia().

bool zypp::target::TargetImpl::isStorageEnabled  )  const
 

enables the storage target

Definition at line 98 of file TargetImpl.cc.

References _storage_enabled.

void zypp::target::TargetImpl::enableStorage const Pathname root_r  ) 
 

Definition at line 104 of file TargetImpl.cc.

References _storage, _storage_enabled, and zypp::storage::PersistentStorage::init().

TargetImpl::PoolItemList zypp::target::TargetImpl::commit const PoolItemList items_r,
const ZYppCommitPolicy policy_r,
const ResPool pool_r
 

Commit ordered changes.

Parameters:
pool_r only needed for #160792
Returns:
uncommitted ones (due to error)

Definition at line 237 of file TargetImpl.cc.

References zypp::ZYppCommitPolicy::dryRun(), zypp::target::rpm::RpmDb::installPackage(), MIL, rpm(), zypp::target::rpm::InstallResolvableReport::RPM, zypp::target::rpm::InstallResolvableReport::RPM_NODEPS, zypp::target::rpm::RpmDb::RPMINST_NODEPS, zypp::target::rpm::RpmDb::RPMINST_NOSIGNATURE, zypp::target::rpm::RpmDb::RPMINST_NOUPGRADE, zypp::target::rpm::RpmDb::RPMINST_TEST, zypp::ZYppCommitPolicy::rpmNoSignature(), WAR, and ZYPP_CAUGHT.

virtual std::ostream& zypp::target::TargetImpl::dumpOn std::ostream &  str  )  const [inline, virtual]
 

Overload to realize stream output.

Reimplemented from zypp::base::ReferenceCounted.

Definition at line 117 of file TargetImpl.h.

rpm::RpmDb & zypp::target::TargetImpl::rpm  ) 
 

The RPM database.

Definition at line 509 of file TargetImpl.cc.

References _rpm.

Referenced by commit().

bool zypp::target::TargetImpl::providesFile const std::string &  path_str,
const std::string &  name_str
const
 

If the package is installed and provides the file Needed to evaluate split provides during Resolver::Upgrade().

Definition at line 512 of file TargetImpl.cc.

References _rpm, and zypp::target::rpm::RpmDb::hasFile().

ResObject::constPtr zypp::target::TargetImpl::whoOwnsFile const std::string &  path_str  )  const
 

Return the resolvable which provides path_str (rpm -qf) return NULL if no resolvable provides this file.

Definition at line 517 of file TargetImpl.cc.

References _rpm, _store, zypp::ResStore::begin(), zypp::ResStore::end(), name, and zypp::target::rpm::RpmDb::whoOwnsFile().

bool zypp::target::TargetImpl::setInstallationLogfile const Pathname path_r  ) 
 

Set the log file for target.

Definition at line 532 of file TargetImpl.cc.

References zypp::target::rpm::RpmDb::setInstallationLogfile().


Friends And Related Function Documentation

std::ostream & operator<< std::ostream &  str,
const TargetImpl obj
[friend]
 

Stream output

Definition at line 152 of file TargetImpl.h.


Member Data Documentation

ResStore zypp::target::TargetImpl::_store [protected]
 

All resolvables provided by the target.

Definition at line 136 of file TargetImpl.h.

Referenced by resolvables(), and whoOwnsFile().

Pathname zypp::target::TargetImpl::_root [protected]
 

Path to the target.

Definition at line 138 of file TargetImpl.h.

Referenced by root(), and TargetImpl().

rpm::RpmDb zypp::target::TargetImpl::_rpm [protected]
 

RPM database.

Definition at line 140 of file TargetImpl.h.

Referenced by providesFile(), resolvables(), rpm(), TargetImpl(), whoOwnsFile(), and ~TargetImpl().

zypp::storage::PersistentStorage zypp::target::TargetImpl::_storage [protected]
 

Definition at line 142 of file TargetImpl.h.

Referenced by enableStorage().

bool zypp::target::TargetImpl::_storage_enabled [protected]
 

Definition at line 143 of file TargetImpl.h.

Referenced by enableStorage(), isStorageEnabled(), and TargetImpl().

TargetImpl_Ptr zypp::target::TargetImpl::_nullimpl [static, private]
 

Null implementation.

Definition at line 147 of file TargetImpl.h.

Referenced by nullimpl().


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:35 2006 for zypp by  doxygen 1.4.6