zypp::source::yum::YUMSourceImpl Class Reference

Class representing a YUM installation source. More...

#include <YUMSourceImpl.h>

Inheritance diagram for zypp::source::yum::YUMSourceImpl:

zypp::source::SourceImpl zypp::base::ReferenceCounted zypp::base::ProvideNumericId< SourceImpl, Source_Ref::NumericId > NonCopyable List of all members.

Public Types

typedef source::yum::YUMProber Prober

Public Member Functions

 YUMSourceImpl ()
 Default Ctor.
virtual Date timestamp () const
 default implementation returns now() so the source is always reread when in doubt
virtual void storeMetadata (const Pathname &cache_dir_r)
virtual std::set< zypp::Resolvable::KindresolvableKinds () const
virtual std::string type (void) const
bool downloadNeeded (const Pathname &localdir)
 is the download of metadata from the url needed
Package::Ptr createPackage (Source_Ref source_r, const zypp::parser::yum::YUMPrimaryData &parsed, const zypp::parser::yum::YUMFileListData &filelist, const zypp::parser::yum::YUMOtherData &other, zypp::detail::ResImplTraits< zypp::source::yum::YUMPackageImpl >::Ptr &impl)
Atom::Ptr augmentPackage (Source_Ref source_r, const zypp::parser::yum::YUMPatchPackage &parsed)
Selection::Ptr createGroup (Source_Ref source_r, const zypp::parser::yum::YUMGroupData &parsed)
Pattern::Ptr createPattern (Source_Ref source_r, const zypp::parser::yum::YUMPatternData &parsed)
Message::Ptr createMessage (Source_Ref source_r, const zypp::parser::yum::YUMPatchMessage &parsed, Patch::constPtr patch)
Script::Ptr createScript (Source_Ref source_r, const zypp::parser::yum::YUMPatchScript &parsed)
Patch::Ptr createPatch (Source_Ref source_r, const zypp::parser::yum::YUMPatchData &parsed)
Product::Ptr createProduct (Source_Ref source_r, const zypp::parser::yum::YUMProductData &parsed)
Dependencies createDependencies (const zypp::parser::yum::YUMObjectData &parsed, const Resolvable::Kind my_kind)
Dependencies createGroupDependencies (const zypp::parser::yum::YUMGroupData &parsed)
Capability createCapability (const YUMDependency &dep, const Resolvable::Kind &my_kind)

Static Public Member Functions

static std::string typeString (void)
 Text used for identifying the type of the source.

Private Types

typedef std::map< zypp::NVRA,
ImplAndPackage
PackageImplMapT

Private Member Functions

virtual void factoryInit ()
 Ctor substitute.
void readRepomd ()
 Check checksums of metadata files.
virtual void createResolvables (Source_Ref source_r)
 Late initialize the ResStore.
virtual ResStore provideResolvablesByKind (Source_Ref source_r, zypp::Resolvable::Kind kind)
 Provide only resolvable of a certain kind.
void provideProducts (Source_Ref source_r, ResStore &store)
void providePackages (Source_Ref source_r, ResStore &store)
void provideSelections (Source_Ref source_r, ResStore &store)
void providePatterns (Source_Ref source_r, ResStore &store)
void providePatches (Source_Ref source_r, ResStore &store)
const Pathname metadataRoot () const
bool cacheExists ()
const TmpDir downloadMetadata ()
void saveMetadataTo (const Pathname &dir_r)
const Pathname repomdFile () const
const Pathname repomdFileSignature () const
const Pathname repomdFileKey () const

Private Attributes

std::list< YUMRepomdData_Ptr > _repo_primary
std::list< YUMRepomdData_Ptr > _repo_files
std::list< YUMRepomdData_Ptr > _repo_group
std::list< YUMRepomdData_Ptr > _repo_pattern
std::list< YUMRepomdData_Ptr > _repo_product
std::list< YUMRepomdData_Ptr > _repo_patches
PackageImplMapT _package_impl

Classes

struct  ImplAndPackage

Detailed Description

Class representing a YUM installation source.

Definition at line 66 of file YUMSourceImpl.h.


Member Typedef Documentation

typedef source::yum::YUMProber zypp::source::yum::YUMSourceImpl::Prober
 

Definition at line 70 of file YUMSourceImpl.h.

typedef std::map<zypp::NVRA, ImplAndPackage> zypp::source::yum::YUMSourceImpl::PackageImplMapT [private]
 

Definition at line 203 of file YUMSourceImpl.h.


Constructor & Destructor Documentation

zypp::source::yum::YUMSourceImpl::YUMSourceImpl  ) 
 

Default Ctor.

Just initilizes data members. Metadata retrieval is delayed untill factoryInit.

Definition at line 108 of file YUMSourceImpl.cc.


Member Function Documentation

Date zypp::source::yum::YUMSourceImpl::timestamp  )  const [virtual]
 

default implementation returns now() so the source is always reread when in doubt

Reimplemented from zypp::source::SourceImpl.

Definition at line 111 of file YUMSourceImpl.cc.

References repomdFile().

void zypp::source::yum::YUMSourceImpl::storeMetadata const Pathname cache_dir_r  )  [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 315 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::filesystem::Pathname::empty(), and saveMetadataTo().

Referenced by factoryInit().

std::set< zypp::Resolvable::Kind > zypp::source::yum::YUMSourceImpl::resolvableKinds  )  const [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 422 of file YUMSourceImpl.cc.

References _repo_group, _repo_patches, _repo_pattern, _repo_primary, and _repo_product.

virtual std::string zypp::source::yum::YUMSourceImpl::type void   )  const [inline, virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 85 of file YUMSourceImpl.h.

References typeString().

static std::string zypp::source::yum::YUMSourceImpl::typeString void   )  [inline, static]
 

Text used for identifying the type of the source.

Used by the SourceFactory when creating a source of a given type only.

Definition at line 94 of file YUMSourceImpl.h.

Referenced by type().

bool zypp::source::yum::YUMSourceImpl::downloadNeeded const Pathname localdir  ) 
 

is the download of metadata from the url needed

Parameters:
localdir 

Definition at line 290 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_path, zypp::Url::asString(), zypp::filesystem::Pathname::asString(), cacheExists(), zypp::CheckSum::empty(), zypp::source::SourceImpl::provideFile(), repomdFileSignature(), zypp::filesystem::sha1sum(), zypp::source::SourceImpl::url(), and ZYPP_THROW.

Referenced by saveMetadataTo().

Package::Ptr zypp::source::yum::YUMSourceImpl::createPackage Source_Ref  source_r,
const zypp::parser::yum::YUMPrimaryData parsed,
const zypp::parser::yum::YUMFileListData filelist,
const zypp::parser::yum::YUMOtherData other,
zypp::detail::ResImplTraits< zypp::source::yum::YUMPackageImpl >::Ptr &  impl
 

Atom::Ptr zypp::source::yum::YUMSourceImpl::augmentPackage Source_Ref  source_r,
const zypp::parser::yum::YUMPatchPackage parsed
 

Definition at line 917 of file YUMSourceImpl.cc.

References _package_impl, zypp::parser::yum::YUMPatchPackage::arch, zypp::parser::yum::YUMPatchPackage::checksum, zypp::parser::yum::YUMPatchPackage::checksumType, createDependencies(), DBG, deps, zypp::parser::yum::YUMObjectData::epoch, zypp::parser::yum::YUMPatchPackage::installOnly, zypp::packagedelta::PatchRpm::location(), zypp::parser::yum::YUMPatchPackage::location, zypp::detail::makeResolvableFromImpl(), zypp::parser::yum::YUMPatchPackage::media, zypp::parser::yum::YUMObjectData::name, zypp::parser::yum::YUMPatchPackage::patchRpms, zypp::parser::yum::YUMObjectData::rel, zypp::parser::yum::YUMObjectData::ver, and WAR.

Referenced by zypp::source::yum::YUMPatchImpl::YUMPatchImpl().

Selection::Ptr zypp::source::yum::YUMSourceImpl::createGroup Source_Ref  source_r,
const zypp::parser::yum::YUMGroupData parsed
 

Definition at line 1025 of file YUMSourceImpl.cc.

References zypp::Arch_noarch, createGroupDependencies(), zypp::parser::yum::YUMGroupData::groupId, zypp::detail::makeResolvableFromImpl(), zypp::Edition::noedition, ZYPP_CAUGHT, and ZYPP_THROW.

Referenced by provideSelections().

Pattern::Ptr zypp::source::yum::YUMSourceImpl::createPattern Source_Ref  source_r,
const zypp::parser::yum::YUMPatternData parsed
 

Definition at line 1051 of file YUMSourceImpl.cc.

References zypp::parser::yum::YUMPatternData::arch, createDependencies(), zypp::parser::yum::YUMPatternData::epoch, zypp::detail::makeResolvableFromImpl(), zypp::parser::yum::YUMPatternData::name, zypp::parser::yum::YUMPatternData::rel, zypp::parser::yum::YUMPatternData::ver, ZYPP_CAUGHT, and ZYPP_THROW.

Referenced by providePatterns().

Message::Ptr zypp::source::yum::YUMSourceImpl::createMessage Source_Ref  source_r,
const zypp::parser::yum::YUMPatchMessage parsed,
Patch::constPtr  patch
 

Definition at line 1081 of file YUMSourceImpl.cc.

References zypp::parser::yum::YUMObjectData::arch, createDependencies(), zypp::parser::yum::YUMObjectData::epoch, zypp::detail::makeResolvableFromImpl(), zypp::parser::yum::YUMObjectData::name, zypp::parser::yum::YUMObjectData::rel, zypp::parser::yum::YUMObjectData::ver, ZYPP_CAUGHT, and ZYPP_THROW.

Script::Ptr zypp::source::yum::YUMSourceImpl::createScript Source_Ref  source_r,
const zypp::parser::yum::YUMPatchScript parsed
 

Definition at line 1113 of file YUMSourceImpl.cc.

References zypp::parser::yum::YUMObjectData::arch, createDependencies(), zypp::parser::yum::YUMObjectData::epoch, zypp::detail::makeResolvableFromImpl(), zypp::parser::yum::YUMObjectData::name, zypp::parser::yum::YUMObjectData::rel, zypp::parser::yum::YUMObjectData::ver, ZYPP_CAUGHT, and ZYPP_THROW.

Patch::Ptr zypp::source::yum::YUMSourceImpl::createPatch Source_Ref  source_r,
const zypp::parser::yum::YUMPatchData parsed
 

Definition at line 1180 of file YUMSourceImpl.cc.

References zypp::parser::yum::YUMObjectData::arch, zypp::parser::yum::YUMPatchData::atoms, createDependencies(), zypp::parser::yum::YUMObjectData::epoch, zypp::Rel::EQ, zypp::ResTraits< _Res >::kind, zypp::detail::makeResolvableFromImpl(), zypp::parser::yum::YUMObjectData::name, zypp::CapFactory::parse(), zypp::parser::yum::YUMObjectData::rel, and zypp::parser::yum::YUMObjectData::ver.

Product::Ptr zypp::source::yum::YUMSourceImpl::createProduct Source_Ref  source_r,
const zypp::parser::yum::YUMProductData parsed
 

Definition at line 1144 of file YUMSourceImpl.cc.

References zypp::parser::yum::YUMObjectData::arch, createDependencies(), zypp::parser::yum::YUMObjectData::epoch, zypp::detail::makeResolvableFromImpl(), zypp::parser::yum::YUMProductData::name, name, zypp::parser::yum::YUMObjectData::rel, zypp::parser::yum::YUMObjectData::ver, ZYPP_CAUGHT, and ZYPP_THROW.

Referenced by provideProducts().

Dependencies zypp::source::yum::YUMSourceImpl::createDependencies const zypp::parser::yum::YUMObjectData parsed,
const Resolvable::Kind  my_kind
 

Definition at line 1310 of file YUMSourceImpl.cc.

References createCapability(), zypp::Dep::PROVIDES, and zypp::parser::yum::YUMObjectData::provides.

Referenced by augmentPackage(), createMessage(), createPatch(), createPattern(), createProduct(), and createScript().

Dependencies zypp::source::yum::YUMSourceImpl::createGroupDependencies const zypp::parser::yum::YUMGroupData parsed  ) 
 

Definition at line 1392 of file YUMSourceImpl.cc.

References createCapability(), zypp::parser::yum::YUMGroupData::packageList, zypp::Dep::RECOMMENDS, zypp::Dep::REQUIRES, and zypp::Dep::SUGGESTS.

Referenced by createGroup().

Capability zypp::source::yum::YUMSourceImpl::createCapability const YUMDependency dep,
const Resolvable::Kind my_kind
 

Definition at line 1457 of file YUMSourceImpl.cc.

References zypp::parser::yum::YUMDependency::epoch, zypp::parser::yum::YUMDependency::flags, zypp::parser::yum::YUMDependency::isEncoded(), zypp::parser::yum::YUMDependency::kind, zypp::parser::yum::YUMDependency::name, zypp::CapFactory::parse(), zypp::parser::yum::YUMDependency::rel, and zypp::parser::yum::YUMDependency::ver.

Referenced by createDependencies(), and createGroupDependencies().

void zypp::source::yum::YUMSourceImpl::factoryInit  )  [private, virtual]
 

Ctor substitute.

Actually get the metadata.

Exceptions:
EXCEPTION on fail

Reimplemented from zypp::source::SourceImpl.

Definition at line 253 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::autorefresh(), cacheExists(), DBG, zypp::filesystem::Pathname::empty(), readRepomd(), zypp::source::SourceImpl::resetMediaVerifier(), saveMetadataTo(), storeMetadata(), and zypp::source::SourceImpl::tmpMetadataDir().

void zypp::source::yum::YUMSourceImpl::readRepomd  )  [private]
 

Check checksums of metadata files.

Exceptions:
EXCEPTION on fail

Definition at line 372 of file YUMSourceImpl.cc.

References _repo_files, _repo_group, _repo_patches, _repo_pattern, _repo_primary, _repo_product, zypp::bit::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), DBG, ERR, zypp::source::SourceReport::NO_ERROR, repomdFile(), report, and zypp::source::SourceImpl::selfSourceRef().

Referenced by factoryInit().

void zypp::source::yum::YUMSourceImpl::createResolvables Source_Ref  source_r  )  [private, virtual]
 

Late initialize the ResStore.

Reimplemented from zypp::source::SourceImpl.

Definition at line 858 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_store, providePackages(), providePatches(), providePatterns(), provideProducts(), provideSelections(), and zypp::source::SourceImpl::selfSourceRef().

ResStore zypp::source::yum::YUMSourceImpl::provideResolvablesByKind Source_Ref  source_r,
zypp::Resolvable::Kind  kind
[private, virtual]
 

Provide only resolvable of a certain kind.

Reimplemented from zypp::source::SourceImpl.

Definition at line 838 of file YUMSourceImpl.cc.

References providePackages(), providePatches(), providePatterns(), provideProducts(), provideSelections(), and zypp::source::SourceImpl::selfSourceRef().

void zypp::source::yum::YUMSourceImpl::provideProducts Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 444 of file YUMSourceImpl.cc.

References _, _repo_product, zypp::filesystem::Pathname::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), createProduct(), ERR, zypp::str::form(), zypp::ResStore::insert(), zypp::source::SourceReport::INVALID, metadataRoot(), report, zypp::source::SourceImpl::selfSourceRef(), and ZYPP_THROW.

Referenced by createResolvables(), and provideResolvablesByKind().

void zypp::source::yum::YUMSourceImpl::providePackages Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 502 of file YUMSourceImpl.cc.

References _, _repo_files, zypp::filesystem::Pathname::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), DBG, zypp::str::form(), zypp::source::yum::get_stream_size(), zypp::source::SourceReport::INVALID, metadataRoot(), report, zypp::source::SourceImpl::selfSourceRef(), and ZYPP_THROW.

Referenced by createResolvables(), and provideResolvablesByKind().

void zypp::source::yum::YUMSourceImpl::provideSelections Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 631 of file YUMSourceImpl.cc.

References _, _repo_group, zypp::filesystem::Pathname::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), createGroup(), DBG, zypp::str::form(), zypp::ResStore::insert(), zypp::source::SourceReport::INVALID, metadataRoot(), report, zypp::source::SourceImpl::selfSourceRef(), and ZYPP_THROW.

Referenced by createResolvables(), and provideResolvablesByKind().

void zypp::source::yum::YUMSourceImpl::providePatterns Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 681 of file YUMSourceImpl.cc.

References _, _repo_pattern, zypp::filesystem::Pathname::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), createPattern(), DBG, zypp::str::form(), zypp::ResStore::insert(), zypp::source::SourceReport::INVALID, metadataRoot(), report, zypp::source::SourceImpl::selfSourceRef(), and ZYPP_THROW.

Referenced by createResolvables(), and provideResolvablesByKind().

void zypp::source::yum::YUMSourceImpl::providePatches Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 731 of file YUMSourceImpl.cc.

References _, _repo_patches, zypp::filesystem::Pathname::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), DBG, zypp::str::form(), zypp::source::SourceReport::INVALID, metadataRoot(), report, zypp::source::SourceImpl::selfSourceRef(), and ZYPP_THROW.

Referenced by createResolvables(), and provideResolvablesByKind().

const Pathname zypp::source::yum::YUMSourceImpl::metadataRoot  )  const [private]
 

Definition at line 127 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::filesystem::Pathname::empty(), and zypp::source::SourceImpl::tmpMetadataDir().

Referenced by providePackages(), providePatches(), providePatterns(), provideProducts(), provideSelections(), repomdFile(), repomdFileKey(), and repomdFileSignature().

bool zypp::source::yum::YUMSourceImpl::cacheExists  )  [private]
 

Definition at line 116 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, MIL, and repomdFile().

Referenced by downloadNeeded(), and factoryInit().

const TmpDir zypp::source::yum::YUMSourceImpl::downloadMetadata  )  [private]
 

Definition at line 147 of file YUMSourceImpl.cc.

References _, zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_path, zypp::filesystem::assert_dir(), zypp::Url::asString(), zypp::filesystem::Pathname::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), zypp::filesystem::copy(), DBG, zypp::source::SourceImpl::getPossiblyCachedMetadataFile(), MIL, zypp::filesystem::TmpPath::path(), zypp::source::SourceImpl::provideFile(), report, zypp::source::SourceImpl::selfSourceRef(), zypp::source::SourceImpl::tryToProvideFile(), zypp::source::SourceImpl::url(), WAR, ZYPP_CAUGHT, and ZYPP_THROW.

Referenced by saveMetadataTo().

void zypp::source::yum::YUMSourceImpl::saveMetadataTo const Pathname dir_r  )  [private]
 

Definition at line 333 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::alias(), zypp::source::SourceImpl::copyLocalMetadata(), downloadMetadata(), downloadNeeded(), MIL, and ZYPP_THROW.

Referenced by factoryInit(), and storeMetadata().

const Pathname zypp::source::yum::YUMSourceImpl::repomdFile  )  const [private]
 

Definition at line 132 of file YUMSourceImpl.cc.

References metadataRoot().

Referenced by cacheExists(), readRepomd(), and timestamp().

const Pathname zypp::source::yum::YUMSourceImpl::repomdFileSignature  )  const [private]
 

Definition at line 137 of file YUMSourceImpl.cc.

References metadataRoot().

Referenced by downloadNeeded().

const Pathname zypp::source::yum::YUMSourceImpl::repomdFileKey  )  const [private]
 

Definition at line 142 of file YUMSourceImpl.cc.

References metadataRoot().


Member Data Documentation

std::list<YUMRepomdData_Ptr> zypp::source::yum::YUMSourceImpl::_repo_primary [private]
 

Definition at line 177 of file YUMSourceImpl.h.

Referenced by readRepomd(), and resolvableKinds().

std::list<YUMRepomdData_Ptr> zypp::source::yum::YUMSourceImpl::_repo_files [private]
 

Definition at line 178 of file YUMSourceImpl.h.

Referenced by providePackages(), and readRepomd().

std::list<YUMRepomdData_Ptr> zypp::source::yum::YUMSourceImpl::_repo_group [private]
 

Definition at line 179 of file YUMSourceImpl.h.

Referenced by provideSelections(), readRepomd(), and resolvableKinds().

std::list<YUMRepomdData_Ptr> zypp::source::yum::YUMSourceImpl::_repo_pattern [private]
 

Definition at line 180 of file YUMSourceImpl.h.

Referenced by providePatterns(), readRepomd(), and resolvableKinds().

std::list<YUMRepomdData_Ptr> zypp::source::yum::YUMSourceImpl::_repo_product [private]
 

Definition at line 181 of file YUMSourceImpl.h.

Referenced by provideProducts(), readRepomd(), and resolvableKinds().

std::list<YUMRepomdData_Ptr> zypp::source::yum::YUMSourceImpl::_repo_patches [private]
 

Definition at line 182 of file YUMSourceImpl.h.

Referenced by providePatches(), readRepomd(), and resolvableKinds().

PackageImplMapT zypp::source::yum::YUMSourceImpl::_package_impl [private]
 

Definition at line 204 of file YUMSourceImpl.h.

Referenced by augmentPackage().


The documentation for this class was generated from the following files:
Generated on Thu Apr 24 02:25:15 2008 for zypp by  doxygen 1.4.6