#include <SuseTagsImpl.h>
Inheritance diagram for zypp::source::susetags::SuseTagsImpl:

Public Types | |
| typedef source::susetags::SuseTagsProber | Prober |
| typedef intrusive_ptr< SuseTagsImpl > | Ptr |
| typedef intrusive_ptr< const SuseTagsImpl > | constPtr |
Public Member Functions | |
| SuseTagsImpl () | |
| Default Ctor. | |
| ~SuseTagsImpl () | |
| Dtor. | |
| virtual std::string | type (void) const |
| virtual Date | timestamp () const |
| default implementation returns now() so the source is always reread when in doubt | |
| virtual unsigned | numberOfMedia (void) const |
| virtual std::string | vendor (void) const |
| virtual const std::list< Pathname > | publicKeys () |
| virtual std::string | unique_id (void) const |
| Pathname | sourceDir (const std::string &dir) |
| virtual void | storeMetadata (const Pathname &cache_dir_r) |
| virtual std::set< zypp::Resolvable::Kind > | resolvableKinds () const |
| virtual media::MediaVerifierRef | verifier (media::MediaNr media_nr) |
| Get media verifier for the specified media. | |
Static Public Member Functions | |
| static std::string | typeString (void) |
| Text used for identifying the type of the source. | |
Public Attributes | |
| std::map< NVRA, SuseTagsPackageImplData > | _package_data |
| std::map< NVRA, DefaultFalseBool > | _is_shared |
| std::map< NVRA, DefaultFalseBool > | _provides_shared_data |
| std::list< std::string > | _pkg_translations |
Protected Member Functions | |
| virtual std::ostream & | dumpOn (std::ostream &str) const |
| Stream output. | |
| void | initCacheDir (const Pathname &cache_dir_r) |
| bool | cacheExists () const |
Private Member Functions | |
| virtual void | factoryInit () |
| Ctor substitute. | |
| virtual void | createResolvables (Source_Ref source_r) |
| Late initialize the ResStore. | |
| virtual ResStore | createResolvablesByKind (Source_Ref source_r, zypp::Resolvable::Kind kind) |
| Provide only resolvables of a certain kind. | |
| const Pathname | metadataRoot () const |
| const Pathname | contentFile () const |
| const Pathname | contentFileKey () const |
| const Pathname | contentFileSignature () const |
| const Pathname | descrDir () const |
| const Pathname | mediaFile () const |
| void | saveMetadataTo (const Pathname &dir_r) |
| const Pathname | mediaDescrDir () const |
| description dir in original media it is not always the same so it requires the content file to be parsed | |
| const Pathname | dataDir () const |
| data dir in original media it is not always the same so it requires the content file to be parsed | |
| void | readContentFile (const Pathname &p) |
| reads content file, initializes the data and media descr dir and saves the product object but it does not add it to the store yet | |
| void | readMediaFile (const Pathname &p) |
| reads a media file and installs a media verifier if available | |
| TmpDir | downloadMetadata () |
| bool | downloadNeeded (const Pathname &localdir) |
| 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 | provideSelection (Source_Ref source_r, ResStore &store) |
| void | providePatterns (Source_Ref source_r, ResStore &store) |
Private Attributes | |
| unsigned | _media_count |
| Pathname | _data_dir |
| Pathname | _media_descr_dir |
| std::string | _media_vendor |
| std::string | _media_id |
| detail::ResImplTraits< SuseTagsProductImpl >::Ptr | _prodImpl |
| pointer to the product implementation we need it to access the checksums if we are in verify mode | |
| Product::Ptr | _product |
Definition at line 71 of file SuseTagsImpl.h.
Definition at line 74 of file SuseTagsImpl.h.
| typedef intrusive_ptr<SuseTagsImpl> zypp::source::susetags::SuseTagsImpl::Ptr |
Definition at line 75 of file SuseTagsImpl.h.
| typedef intrusive_ptr<const SuseTagsImpl> zypp::source::susetags::SuseTagsImpl::constPtr |
Definition at line 76 of file SuseTagsImpl.h.
| zypp::source::susetags::SuseTagsImpl::SuseTagsImpl | ( | ) |
Default Ctor.
Just initilizes data members. Metadata retrieval is delayed untill factoryInit.
Definition at line 97 of file SuseTagsImpl.cc.
| zypp::source::susetags::SuseTagsImpl::~SuseTagsImpl | ( | ) |
| virtual std::string zypp::source::susetags::SuseTagsImpl::type | ( | void | ) | const [inline, virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 88 of file SuseTagsImpl.h.
References typeString().
| static std::string zypp::source::susetags::SuseTagsImpl::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 97 of file SuseTagsImpl.h.
Referenced by type().
| Date zypp::source::susetags::SuseTagsImpl::timestamp | ( | ) | const [virtual] |
default implementation returns now() so the source is always reread when in doubt
Reimplemented from zypp::source::SourceImpl.
Definition at line 589 of file SuseTagsImpl.cc.
References contentFile().
| unsigned zypp::source::susetags::SuseTagsImpl::numberOfMedia | ( | void | ) | const [virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 574 of file SuseTagsImpl.cc.
References _media_count.
Referenced by factoryInit().
| std::string zypp::source::susetags::SuseTagsImpl::vendor | ( | void | ) | const [virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 579 of file SuseTagsImpl.cc.
References _prodImpl.
| const std::list< Pathname > zypp::source::susetags::SuseTagsImpl::publicKeys | ( | ) | [virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 526 of file SuseTagsImpl.cc.
References metadataRoot(), MIL, and zypp::filesystem::readdir().
| std::string zypp::source::susetags::SuseTagsImpl::unique_id | ( | void | ) | const [virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 584 of file SuseTagsImpl.cc.
References _media_id.
| Pathname zypp::source::susetags::SuseTagsImpl::sourceDir | ( | const std::string & | dir | ) |
| void zypp::source::susetags::SuseTagsImpl::storeMetadata | ( | const Pathname & | cache_dir_r | ) | [virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 409 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::copyLocalMetadata(), MIL, saveMetadataTo(), and zypp::source::SourceImpl::tmpMetadataDir().
Referenced by factoryInit().
| std::set< zypp::Resolvable::Kind > zypp::source::susetags::SuseTagsImpl::resolvableKinds | ( | ) | const [virtual] |
Reimplemented from zypp::source::SourceImpl.
Definition at line 141 of file SuseTagsImpl.cc.
References descrDir().
| media::MediaVerifierRef zypp::source::susetags::SuseTagsImpl::verifier | ( | media::MediaNr | media_nr | ) | [virtual] |
Get media verifier for the specified media.
Definition at line 568 of file SuseTagsImpl.cc.
References _media_id, and _media_vendor.
| std::ostream & zypp::source::susetags::SuseTagsImpl::dumpOn | ( | std::ostream & | str | ) | const [protected, virtual] |
Stream output.
Reimplemented from zypp::source::SourceImpl.
Definition at line 878 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::dumpOn().
| void zypp::source::susetags::SuseTagsImpl::initCacheDir | ( | const Pathname & | cache_dir_r | ) | [protected] |
Definition at line 393 of file SuseTagsImpl.cc.
References zypp::filesystem::assert_dir(), zypp::filesystem::clean_dir(), zypp::filesystem::mkdir(), and ZYPP_THROW.
| bool zypp::source::susetags::SuseTagsImpl::cacheExists | ( | ) | const [protected] |
Definition at line 455 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_cache_dir, and MIL.
Referenced by downloadNeeded(), and factoryInit().
| void zypp::source::susetags::SuseTagsImpl::factoryInit | ( | ) | [private, virtual] |
Ctor substitute.
Actually get the metadata.
| EXCEPTION | on fail |
Reimplemented from zypp::source::SourceImpl.
Definition at line 476 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_cache_dir, _product, zypp::source::SourceImpl::alias(), zypp::source::SourceImpl::autorefresh(), cacheExists(), contentFile(), dataDir(), mediaFile(), metadataRoot(), MIL, numberOfMedia(), zypp::source::SourceImpl::path(), readContentFile(), readMediaFile(), saveMetadataTo(), zypp::source::SourceImpl::setAlias(), storeMetadata(), zypp::source::SourceImpl::tmpMetadataDir(), and zypp::source::SourceImpl::url().
| void zypp::source::susetags::SuseTagsImpl::createResolvables | ( | Source_Ref | source_r | ) | [private, virtual] |
Late initialize the ResStore.
Reimplemented from zypp::source::SourceImpl.
Definition at line 518 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_store, providePackages(), providePatterns(), provideProducts(), and provideSelections().
| ResStore zypp::source::susetags::SuseTagsImpl::createResolvablesByKind | ( | Source_Ref | source_r, | |
| zypp::Resolvable::Kind | kind | |||
| ) | [private, virtual] |
Provide only resolvables of a certain kind.
Definition at line 540 of file SuseTagsImpl.cc.
References providePackages(), providePatterns(), provideProducts(), and provideSelections().
| const Pathname zypp::source::susetags::SuseTagsImpl::metadataRoot | ( | ) | const [private] |
Definition at line 100 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_cache_dir, and zypp::source::SourceImpl::tmpMetadataDir().
Referenced by contentFile(), contentFileKey(), contentFileSignature(), descrDir(), factoryInit(), mediaFile(), and publicKeys().
| const Pathname zypp::source::susetags::SuseTagsImpl::contentFile | ( | ) | const [private] |
Definition at line 105 of file SuseTagsImpl.cc.
References metadataRoot().
Referenced by factoryInit(), and timestamp().
| const Pathname zypp::source::susetags::SuseTagsImpl::contentFileKey | ( | ) | const [private] |
| const Pathname zypp::source::susetags::SuseTagsImpl::contentFileSignature | ( | ) | const [private] |
| const Pathname zypp::source::susetags::SuseTagsImpl::descrDir | ( | ) | const [private] |
Definition at line 125 of file SuseTagsImpl.cc.
References metadataRoot().
Referenced by providePackages(), providePatterns(), provideSelections(), and resolvableKinds().
| const Pathname zypp::source::susetags::SuseTagsImpl::mediaFile | ( | ) | const [private] |
Definition at line 120 of file SuseTagsImpl.cc.
References metadataRoot().
Referenced by factoryInit().
| void zypp::source::susetags::SuseTagsImpl::saveMetadataTo | ( | const Pathname & | dir_r | ) | [private] |
Definition at line 425 of file SuseTagsImpl.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::susetags::SuseTagsImpl::mediaDescrDir | ( | ) | const [private] |
description dir in original media it is not always the same so it requires the content file to be parsed
Definition at line 135 of file SuseTagsImpl.cc.
References _media_descr_dir.
Referenced by downloadMetadata().
| const Pathname zypp::source::susetags::SuseTagsImpl::dataDir | ( | ) | const [private] |
data dir in original media it is not always the same so it requires the content file to be parsed
Definition at line 130 of file SuseTagsImpl.cc.
References _data_dir.
Referenced by factoryInit().
| void zypp::source::susetags::SuseTagsImpl::readContentFile | ( | const Pathname & | p | ) | [private] |
reads content file, initializes the data and media descr dir and saves the product object but it does not add it to the store yet
Definition at line 594 of file SuseTagsImpl.cc.
References _data_dir, _media_descr_dir, zypp::source::SourceImpl::_path, _prodImpl, _product, zypp::SourceFactory::createFrom(), DBG, MIL, zypp::Exception::msg(), zypp::source::susetags::ProductMetadataParser::parse(), zypp::source::susetags::ProductMetadataParser::prodImpl, zypp::source::susetags::ProductMetadataParser::result, and ZYPP_THROW.
Referenced by downloadMetadata(), and factoryInit().
| void zypp::source::susetags::SuseTagsImpl::readMediaFile | ( | const Pathname & | p | ) | [private] |
reads a media file and installs a media verifier if available
Definition at line 189 of file SuseTagsImpl.cc.
References _media_count, _media_id, zypp::source::SourceImpl::_media_set, _media_vendor, zypp::media::MediaManager::addVerifier(), zypp::media::MediaManager::delVerifier(), zypp::str::getline(), zypp::source::SourceImpl::media_mgr, MIL, zypp::str::TRIM, WAR, ZYPP_CAUGHT, and ZYPP_THROW.
Referenced by downloadMetadata(), and factoryInit().
| TmpDir zypp::source::susetags::SuseTagsImpl::downloadMetadata | ( | ) | [private] |
Definition at line 235 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_path, _prodImpl, zypp::filesystem::assert_dir(), zypp::ui::asString(), zypp::Url::asString(), zypp::filesystem::copy(), zypp::filesystem::copy_dir(), zypp::source::SourceImpl::dirInfo(), zypp::source::SourceImpl::getPossiblyCachedMetadataFile(), mediaDescrDir(), MIL, zypp::source::SourceImpl::path(), zypp::filesystem::TmpPath::path(), zypp::source::SourceImpl::provideDirTree(), zypp::source::SourceImpl::provideFile(), readContentFile(), readMediaFile(), zypp::source::SourceImpl::resetMediaVerifier(), zypp::source::SourceImpl::url(), and ZYPP_THROW.
Referenced by saveMetadataTo().
| bool zypp::source::susetags::SuseTagsImpl::downloadNeeded | ( | const Pathname & | localdir | ) | [private] |
Definition at line 159 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::alias(), cacheExists(), zypp::CheckSum::checksum(), zypp::CheckSum::empty(), MIL, zypp::filesystem::sha1sum(), and zypp::source::SourceImpl::tryToProvideFile().
Referenced by saveMetadataTo().
| void zypp::source::susetags::SuseTagsImpl::provideProducts | ( | Source_Ref | source_r, | |
| ResStore & | store | |||
| ) | [private] |
Definition at line 620 of file SuseTagsImpl.cc.
References _product, zypp::ResStore::insert(), and MIL.
Referenced by createResolvables(), and createResolvablesByKind().
| void zypp::source::susetags::SuseTagsImpl::providePackages | ( | Source_Ref | source_r, | |
| ResStore & | store | |||
| ) | [private] |
Definition at line 626 of file SuseTagsImpl.cc.
References _, _is_shared, _package_data, _pkg_translations, DBG, descrDir(), ERR, zypp::str::form(), zypp::ResStore::insert(), zypp::source::SourceReport::INVALID, zypp::detail::makeResolvableFromImpl(), MIL, zypp::Exception::msg(), zypp::source::SourceReport::NO_ERROR, zypp::source::susetags::parsePackages(), zypp::source::susetags::parsePackagesDiskUsage(), zypp::source::susetags::parsePackagesLang(), zypp::filesystem::readdir(), report, zypp::source::SourceImpl::selfSourceRef(), WAR, ZYPP_CAUGHT, and ZYPP_THROW.
Referenced by createResolvables(), and createResolvablesByKind().
| void zypp::source::susetags::SuseTagsImpl::provideSelections | ( | Source_Ref | source_r, | |
| ResStore & | store | |||
| ) | [private] |
Definition at line 771 of file SuseTagsImpl.cc.
References DBG, descrDir(), zypp::str::getline(), zypp::ResStore::insert(), MIL, and zypp::source::susetags::parseSelection().
Referenced by createResolvables(), and createResolvablesByKind().
| void zypp::source::susetags::SuseTagsImpl::provideSelection | ( | Source_Ref | source_r, | |
| ResStore & | store | |||
| ) | [private] |
| void zypp::source::susetags::SuseTagsImpl::providePatterns | ( | Source_Ref | source_r, | |
| ResStore & | store | |||
| ) | [private] |
Definition at line 823 of file SuseTagsImpl.cc.
References zypp::source::SourceImpl::_store, DBG, descrDir(), zypp::str::getline(), zypp::ResStore::insert(), MIL, and zypp::source::susetags::parsePattern().
Referenced by createResolvables(), and createResolvablesByKind().
unsigned zypp::source::susetags::SuseTagsImpl::_media_count [private] |
Pathname zypp::source::susetags::SuseTagsImpl::_data_dir [private] |
Definition at line 183 of file SuseTagsImpl.h.
Referenced by dataDir(), readContentFile(), and sourceDir().
Pathname zypp::source::susetags::SuseTagsImpl::_media_descr_dir [private] |
Definition at line 188 of file SuseTagsImpl.h.
Referenced by mediaDescrDir(), and readContentFile().
std::string zypp::source::susetags::SuseTagsImpl::_media_vendor [private] |
std::string zypp::source::susetags::SuseTagsImpl::_media_id [private] |
Definition at line 191 of file SuseTagsImpl.h.
Referenced by readMediaFile(), unique_id(), and verifier().
detail::ResImplTraits<SuseTagsProductImpl>::Ptr zypp::source::susetags::SuseTagsImpl::_prodImpl [private] |
pointer to the product implementation we need it to access the checksums if we are in verify mode
Definition at line 196 of file SuseTagsImpl.h.
Referenced by downloadMetadata(), readContentFile(), and vendor().
Definition at line 197 of file SuseTagsImpl.h.
Referenced by factoryInit(), provideProducts(), and readContentFile().
Definition at line 205 of file SuseTagsImpl.h.
| std::list<std::string> zypp::source::susetags::SuseTagsImpl::_pkg_translations |
1.5.0