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 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::string type (void) const
virtual void createResolvables (Source_Ref source_r)
 Late initialize the ResStore.
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.
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 () const
 Check checksums of metadata files.
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

PackageImplMapT _package_impl

Classes

struct  ImplAndPackage

Detailed Description

Class representing a YUM installation source.

Definition at line 50 of file YUMSourceImpl.h.


Member Typedef Documentation

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

Definition at line 158 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

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

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

Referenced by factoryInit().

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

Reimplemented from zypp::source::SourceImpl.

Definition at line 65 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 72 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 389 of file YUMSourceImpl.cc.

References zypp::bit::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), DBG, ERR, repomdFile(), report, and zypp::source::SourceImpl::url().

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

is the download of metadata from the url needed

Parameters:
localdir 

Definition at line 310 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 741 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::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 843 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 869 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 899 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 931 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 994 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 962 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 1115 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 1197 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 1262 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 236 of file YUMSourceImpl.cc.

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

void zypp::source::yum::YUMSourceImpl::checkMetadataChecksums  )  const [private]
 

Check checksums of metadata files.

Exceptions:
EXCEPTION on fail

Definition at line 269 of file YUMSourceImpl.cc.

References zypp::source::SourceImpl::_path, zypp::filesystem::Pathname::asString(), zypp::bit::asString(), zypp::parser::XMLNodeIteratorBase::atEnd(), checkCheckSum(), DBG, metadataRoot(), N_, repomdFile(), and ZYPP_THROW.

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

Definition at line 82 of file YUMSourceImpl.cc.

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

Referenced by checkMetadataChecksums(), repomdFile(), repomdFileKey(), and repomdFileSignature().

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

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

References zypp::source::SourceImpl::_path, zypp::filesystem::assert_dir(), zypp::Url::asString(), zypp::filesystem::Pathname::asString(), checkCheckSum(), zypp::filesystem::copy(), DBG, MIL, N_, zypp::filesystem::TmpPath::path(), zypp::source::SourceImpl::provideFile(), 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 351 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 87 of file YUMSourceImpl.cc.

References metadataRoot().

Referenced by cacheExists(), checkMetadataChecksums(), createResolvables(), and timestamp().

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

Definition at line 92 of file YUMSourceImpl.cc.

References metadataRoot().

Referenced by downloadNeeded().

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

Definition at line 97 of file YUMSourceImpl.cc.

References metadataRoot().

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

Definition at line 1287 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(), downloadMetadata(), and zypp::source::yum::YUMScriptImpl::undo_script().


Member Data Documentation

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

Definition at line 159 of file YUMSourceImpl.h.

Referenced by augmentPackage().


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