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 Member Functions

 YUMSourceImpl ()
 Default Ctor.
virtual void storeMetadata (const Pathname &cache_dir_r)
virtual std::string type (void) const
virtual void createResolvables (Source_Ref source_r)
 Late initialize the ResStore.
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.
static bool checkCheckSum (const Pathname &filename, std::string csum_type, const std::string &csum)

Private Types

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

Private Member Functions

virtual void factoryInit ()
 Ctor substitute.
void checkMetadataChecksums (bool from_cache)
 Check checksums of metadata files.
bool cacheExists ()

Private Attributes

std::list< Pathname_metadata_files
Pathname _repomd_file
Pathname _repomd_signature
Pathname _repomd_key
PackageImplMapT _package_impl

Classes

struct  ImplAndPackage

Detailed Description

Class representing a YUM installation source.

Definition at line 45 of file YUMSourceImpl.h.


Member Typedef Documentation

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

Definition at line 143 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 63 of file YUMSourceImpl.cc.


Member Function Documentation

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

Reimplemented from zypp::source::SourceImpl.

Definition at line 207 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_path, _repomd_file, _repomd_key, _repomd_signature, zypp::source::SourceImpl::alias(), zypp::filesystem::assert_dir(), zypp::filesystem::Pathname::asString(), cacheExists(), checkMetadataChecksums(), zypp::CheckSum::checksum(), zypp::filesystem::clean_dir(), zypp::filesystem::copy(), DBG, zypp::filesystem::Pathname::dirname(), zypp::CheckSum::empty(), MIL, zypp::source::SourceImpl::provideFile(), zypp::filesystem::sha1sum(), zypp::source::SourceImpl::tryToProvideFile(), WAR, and ZYPP_THROW.

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

Reimplemented from zypp::source::SourceImpl.

Definition at line 58 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 65 of file YUMSourceImpl.h.

Referenced by type().

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

Late initialize the ResStore.

Reimplemented from zypp::source::SourceImpl.

Definition at line 325 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, _metadata_files, zypp::source::SourceImpl::_path, zypp::filesystem::Pathname::asString(), cacheExists(), DBG, ERR, zypp::source::SourceImpl::provideFile(), and zypp::source::SourceImpl::url().

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 743 of file YUMSourceImpl.cc.

References _package_impl, zypp::source::SourceImpl::_store, zypp::parser::yum::YUMPatchPackage::arch, zypp::parser::yum::YUMPatchPackage::checksum, zypp::parser::yum::YUMPatchPackage::checksumType, createDependencies(), DBG, deps, zypp::parser::yum::YUMObjectData::epoch, zypp::ResStore::erase(), zypp::parser::yum::YUMPatchPackage::installOnly, 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 864 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.

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

Definition at line 890 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.

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

Definition at line 920 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 952 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 1015 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 983 of file YUMSourceImpl.cc.

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

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

Definition at line 1136 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 1211 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 1276 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 77 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_media_set, zypp::source::SourceImpl::_path, _repomd_file, _repomd_key, _repomd_signature, zypp::media::MediaManager::addVerifier(), cacheExists(), DBG, zypp::media::MediaManager::delVerifier(), zypp::filesystem::Pathname::empty(), zypp::source::SourceImpl::media_mgr, MIL, zypp::source::SourceImpl::provideFile(), zypp::source::SourceImpl::tryToProvideFile(), WAR, ZYPP_CAUGHT, and ZYPP_THROW.

void zypp::source::yum::YUMSourceImpl::checkMetadataChecksums bool  from_cache  )  [private]
 

Check checksums of metadata files.

Exceptions:
EXCEPTION on fail

Definition at line 159 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_path, _repomd_file, _repomd_signature, zypp::filesystem::Pathname::asString(), zypp::bit::asString(), checkCheckSum(), DBG, MIL, N_, zypp::source::SourceImpl::provideFile(), zypp::source::SourceImpl::url(), and ZYPP_THROW.

Referenced by storeMetadata().

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

Definition at line 66 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_cache_dir, and MIL.

Referenced by createResolvables(), factoryInit(), and storeMetadata().

bool zypp::source::yum::YUMSourceImpl::checkCheckSum const Pathname filename,
std::string  csum_type,
const std::string &  csum
[static]
 

Definition at line 1301 of file YUMSourceImpl.cc.

References zypp::filesystem::Pathname::asString(), DBG, zypp::Digest::digest(), ERR, MIL, zypp::str::toLower(), and WAR.

Referenced by checkMetadataChecksums(), zypp::source::yum::YUMScriptImpl::do_script(), and zypp::source::yum::YUMScriptImpl::undo_script().


Member Data Documentation

std::list<Pathname> zypp::source::yum::YUMSourceImpl::_metadata_files [private]
 

Definition at line 133 of file YUMSourceImpl.h.

Referenced by createResolvables().

Pathname zypp::source::yum::YUMSourceImpl::_repomd_file [private]
 

Definition at line 134 of file YUMSourceImpl.h.

Referenced by checkMetadataChecksums(), factoryInit(), and storeMetadata().

Pathname zypp::source::yum::YUMSourceImpl::_repomd_signature [private]
 

Definition at line 135 of file YUMSourceImpl.h.

Referenced by checkMetadataChecksums(), factoryInit(), and storeMetadata().

Pathname zypp::source::yum::YUMSourceImpl::_repomd_key [private]
 

Definition at line 136 of file YUMSourceImpl.h.

Referenced by factoryInit(), and storeMetadata().

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

Definition at line 144 of file YUMSourceImpl.h.

Referenced by augmentPackage().


The documentation for this class was generated from the following files:
Generated on Thu May 4 16:03:40 2006 for zypp by  doxygen 1.4.6