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

Public Member Functions | |
| void | factoryCtor (const media::MediaId &media_r, const Pathname &path_r, const std::string &alias_r, const Pathname cache_dir_r, bool base_source, bool auto_refresh) |
| Ctor substitute. | |
| const ResStore & | resolvables (Source_Ref) const |
| All resolvables provided by this source. | |
| const ResStore & | resolvables () const |
| const ResStore | resolvables (zypp::Resolvable::Kind kind) const |
| const Pathname | provideFile (const Pathname &file, const unsigned media_nr=1, bool cached=false, bool checkonly=false) |
| Provide a file to local filesystem. | |
| const Pathname | tryToProvideFile (const Pathname &file, const unsigned media_nr=1) |
| Provide a file to local filesystem if the file does not exists, throws an exception, but does not release the media, useful to provide optional files you want to check if they exists. | |
| const Pathname | provideDirTree (const Pathname &path, const unsigned media_nr=1) |
| Provide a directory to local filesystem. | |
| const void | releaseFile (const Pathname &file_r, const unsigned media_nr=1) |
| const void | releaseDir (const Pathname &path_r, const unsigned media_nr=1, const bool recursive=false) |
| const Pathname | providePackage (Package::constPtr package) |
| void | dirInfo (const unsigned media_nr, std::list< std::string > &retlist, const Pathname &path_r, bool dots=true) const |
| Provide info about a directory. | |
| void | changeMedia (const media::MediaId &media_r, const Pathname &path_r) |
| bool | enabled () const |
| void | enable () |
| void | disable () |
| bool | autorefresh () const |
| void | setAutorefresh (bool enable_r) |
| void | refresh () |
| virtual void | storeMetadata (const Pathname &cache_dir_r) |
| virtual Date | timestamp () const |
| default implementation returns now() so the source is always reread when in doubt | |
| virtual std::string | checksum () const |
| std::string | alias (void) const |
| void | setAlias (const std::string &alias) |
| virtual std::string | id (void) const |
| virtual void | setId (const std::string id_r) |
| virtual unsigned | priority (void) const |
| virtual void | setPriority (unsigned p) |
| virtual unsigned | priorityUnsubscribed (void) const |
| virtual void | setPriorityUnsubscribed (unsigned p) |
| virtual bool | subscribed (void) const |
| virtual void | setSubscribed (bool s) |
| virtual const Pathname & | cacheDir (void) |
| virtual const std::list< Pathname > | publicKeys () |
| virtual std::string | type (void) const |
| Url | url (void) const |
| void | setUrl (const Url &url) |
| bool | remote () const |
| bool | baseSource () const |
| const Pathname & | path (void) const |
| virtual unsigned | numberOfMedia (void) const |
| virtual std::string | vendor (void) const |
| virtual std::string | unique_id (void) const |
| virtual std::string | zmdName (void) const |
| ZMD specific stuff. | |
| virtual void | setZmdName (const std::string name_r) |
| virtual std::string | zmdDescription (void) const |
| virtual void | setZmdDescription (const std::string desc_r) |
| virtual void | redirect (unsigned media_nr, const Url &new_url) |
| void | reattach (const Pathname &attach_point) |
| Reattach the source if it is not mounted, but downloaded, to different directory. | |
| void | release () |
| Release all medias attached by the source. | |
| virtual media::MediaVerifierRef | verifier (unsigned media_nr) |
| Get media verifier for the specified medium. | |
| virtual std::set< zypp::Resolvable::Kind > | resolvableKinds () const |
| Source_Ref | selfSourceRef () |
Provide Source_Ref back to this. | |
| bool | resStoreInitialized () const |
| Whether the ResStore is initialized. | |
Static Public Member Functions | |
| static SourceImpl_Ptr | nullimpl () |
| Offer default Impl. | |
Protected Member Functions | |
| const Pathname | provideJustFile (const Pathname &path, const unsigned media_nr=1, bool cached=false, bool checkonly=false) |
| Provide a file to local filesystem on the given path, no checking or progress information redirection. | |
| void | copyLocalMetadata (const Pathname &src, const Pathname &dst) const |
| Pathname | tmpMetadataDir () const |
| function that creates the tmp metadata dir if it was not created. | |
| void | resetMediaVerifier () |
| reset the media verifier to no verifier | |
| void | getPossiblyCachedMetadataFile (const Pathname &file_to_download, const Pathname &destination, const Pathname &cached_file, const CheckSum &checksum) |
| checks if a file exists in cache if no, downloads it, copies it in given destination, and check matching checksum if yes, compares checksum and copies it to destination locally | |
| SourceImpl () | |
| Default Ctor. | |
| virtual void | factoryInit () |
| Ctor substitute invoked by factoryCtor. | |
| virtual | ~SourceImpl () |
| Dtor. | |
| virtual std::ostream & | dumpOn (std::ostream &str) const |
| Overload to realize stream output. | |
Protected Attributes | |
| ResStore | _store |
| All resolvables provided by this source. | |
| Url | _url |
| URL of the media. | |
| Pathname | _path |
| Path to the source on the media. | |
| bool | _enabled |
| The source is enabled. | |
| bool | _autorefresh |
| If the source metadata should be autorefreshed. | |
| std::string | _alias |
| (user defined) alias of the source | |
| Pathname | _cache_dir |
| Directory holding metadata cache. | |
| std::string | _id |
| (user defined) id of the source mostly used for ZENworks | |
| unsigned | _priority |
| (user defined) default priority of the source | |
| unsigned | _priority_unsubscribed |
| (user defined) unsubscribed priority of the source | |
| bool | _subscribed |
| subscribed?, solver prefers subscribed sources | |
| bool | _base_source |
| source contains base product? | |
| intrusive_ptr< MediaSet > | _media_set |
| Set of medias of the product. | |
Private Member Functions | |
| 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. | |
| SourceImpl (const null &) | |
| Ctor, excl. | |
Private Attributes | |
| media::MediaManager | media_mgr |
| shared_ptr< filesystem::TmpDir > | _tmp_metadata_dir_ptr |
| bool | _res_store_initialized |
| Whether the ResStore is initialized. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const SourceImpl &obj) |
| Stream output. | |
Classes | |
| struct | null |
| Helper indicating creation of nullimpl. More... | |
| class | Verifier |
| SourceImpl MediaVerifier. More... | |
Public access via Source_Ref interface.
Constructed by SourceFactory, via default ctor to create the object, followed by a call to factoryCtor. factoryCtor initializes the remaining data members and calls factoryInit to let implementations actually retrieve the metadata.
Definition at line 103 of file SourceImpl.h.
| zypp::source::SourceImpl::SourceImpl | ( | ) | [protected] |
Default Ctor.
Just create the object and prepare the data members. Then wait for the factoryCtor call to launch the Source.
Definition at line 146 of file SourceImpl.cc.
Referenced by nullimpl().
| zypp::source::SourceImpl::~SourceImpl | ( | ) | [protected, virtual] |
Dtor.
Definition at line 206 of file SourceImpl.cc.
References _media_set, media_mgr, and zypp::media::MediaManager::release().
| zypp::source::SourceImpl::SourceImpl | ( | const null & | ) | [private] |
Ctor, excl.
for nullimpl only. Nullimpl has no Id (0).
Definition at line 136 of file SourceImpl.cc.
| void zypp::source::SourceImpl::factoryCtor | ( | const media::MediaId & | media_r, | |
| const Pathname & | path_r, | |||
| const std::string & | alias_r, | |||
| const Pathname | cache_dir_r, | |||
| bool | base_source, | |||
| bool | auto_refresh | |||
| ) |
Ctor substitute.
Called by SourceFactory to initialize the Source. Actions performed are too complex for a real ctor. So factoryCtor initializes the appropriate data members and then calls factoryInit to launch the Source.
Common cleanup in case factoryInit throws:
| EXCEPTION | on fail |
Definition at line 161 of file SourceImpl.cc.
References _alias, _autorefresh, _base_source, _cache_dir, _media_set, _path, _store, _subscribed, _url, zypp::ResStore::clear(), factoryInit(), media_mgr, MIL, selfSourceRef(), zypp::media::MediaManager::url(), and ZYPP_RETHROW.
| const ResStore& zypp::source::SourceImpl::resolvables | ( | Source_Ref | ) | const [inline] |
All resolvables provided by this source.
Definition at line 135 of file SourceImpl.h.
References resolvables().
| const ResStore & zypp::source::SourceImpl::resolvables | ( | ) | const |
Definition at line 236 of file SourceImpl.cc.
References _res_store_initialized, _store, createResolvables(), and selfSourceRef().
Referenced by resolvables().
| const ResStore zypp::source::SourceImpl::resolvables | ( | zypp::Resolvable::Kind | kind | ) | const |
Definition at line 253 of file SourceImpl.cc.
References provideResolvablesByKind(), and selfSourceRef().
| const Pathname zypp::source::SourceImpl::provideFile | ( | const Pathname & | file, | |
| const unsigned | media_nr = 1, |
|||
| bool | cached = false, |
|||
| bool | checkonly = false | |||
| ) |
Provide a file to local filesystem.
| Exception |
Definition at line 425 of file SourceImpl.cc.
References _, zypp::Url::asString(), zypp::ui::asString(), zypp::str::form(), zypp::source::SourceReport::IO, zypp::source::SourceReport::NO_ERROR, provideJustFile(), report, zypp::source::SourceReport::RETRY, selfSourceRef(), url(), ZYPP_RETHROW, and ZYPP_THROW.
Referenced by zypp::source::yum::YUMSourceImpl::downloadMetadata(), zypp::source::susetags::SuseTagsImpl::downloadMetadata(), zypp::source::yum::YUMSourceImpl::downloadNeeded(), and getPossiblyCachedMetadataFile().
| const Pathname zypp::source::SourceImpl::tryToProvideFile | ( | const Pathname & | file, | |
| const unsigned | media_nr = 1 | |||
| ) |
Provide a file to local filesystem if the file does not exists, throws an exception, but does not release the media, useful to provide optional files you want to check if they exists.
| Exception |
Definition at line 468 of file SourceImpl.cc.
References _media_set, zypp::media::MediaManager::localPath(), media_mgr, and zypp::media::MediaManager::provideFile().
Referenced by zypp::source::yum::YUMSourceImpl::downloadMetadata(), and zypp::source::susetags::SuseTagsImpl::downloadNeeded().
| const Pathname zypp::source::SourceImpl::provideDirTree | ( | const Pathname & | path, | |
| const unsigned | media_nr = 1 | |||
| ) |
Provide a directory to local filesystem.
| Exception |
Definition at line 634 of file SourceImpl.cc.
References _media_set, zypp::media::MediaChangeReport::ABORT, zypp::media::MediaChangeReport::CHANGE_URL, zypp::SourceFactory::createFrom(), DBG, zypp::media::MediaChangeReport::EJECT, ERR, zypp::media::MediaChangeReport::INVALID, zypp::media::MediaManager::localPath(), media_mgr, MIL, zypp::media::MediaChangeReport::NOT_FOUND, zypp::media::MediaManager::provideDirTree(), zypp::media::MediaManager::release(), report, zypp::media::MediaChangeReport::RETRY, zypp::SourceManager::sourceManager(), zypp::media::MediaChangeReport::WRONG, ZYPP_CAUGHT, and ZYPP_RETHROW.
Referenced by zypp::source::susetags::SuseTagsImpl::downloadMetadata().
| const void zypp::source::SourceImpl::releaseFile | ( | const Pathname & | file_r, | |
| const unsigned | media_nr = 1 | |||
| ) |
Definition at line 738 of file SourceImpl.cc.
References _media_set, DBG, media_mgr, and zypp::media::MediaManager::releaseFile().
| const void zypp::source::SourceImpl::releaseDir | ( | const Pathname & | path_r, | |
| const unsigned | media_nr = 1, |
|||
| const bool | recursive = false | |||
| ) |
Definition at line 746 of file SourceImpl.cc.
References _media_set, DBG, media_mgr, zypp::media::MediaManager::releaseDir(), and zypp::media::MediaManager::releasePath().
| const Pathname zypp::source::SourceImpl::providePackage | ( | Package::constPtr | package | ) |
Definition at line 286 of file SourceImpl.cc.
References _, zypp::source::DownloadResolvableReport::ABORT, checksum(), zypp::Digest::digest(), ERR, zypp::str::form(), zypp::source::DownloadResolvableReport::INVALID, MIL, zypp::source::DownloadResolvableReport::NO_ERROR, provideJustFile(), report, zypp::source::DownloadResolvableReport::RETRY, ZYPP_RETHROW, and ZYPP_THROW.
| void zypp::source::SourceImpl::dirInfo | ( | const unsigned | media_nr, | |
| std::list< std::string > & | retlist, | |||
| const Pathname & | path_r, | |||
| bool | dots = true | |||
| ) | const |
Provide info about a directory.
| Exception |
Definition at line 276 of file SourceImpl.cc.
References _media_set, DBG, zypp::media::MediaManager::dirInfo(), and media_mgr.
Referenced by zypp::source::susetags::SuseTagsImpl::downloadMetadata().
| void zypp::source::SourceImpl::changeMedia | ( | const media::MediaId & | media_r, | |
| const Pathname & | path_r | |||
| ) |
Definition at line 758 of file SourceImpl.cc.
References _media_set, _path, _url, DBG, media_mgr, and zypp::media::MediaManager::url().
| bool zypp::source::SourceImpl::enabled | ( | ) | const |
| void zypp::source::SourceImpl::enable | ( | ) |
| void zypp::source::SourceImpl::disable | ( | ) |
| bool zypp::source::SourceImpl::autorefresh | ( | ) | const |
Definition at line 225 of file SourceImpl.cc.
References _autorefresh.
Referenced by zypp::source::yum::YUMSourceImpl::factoryInit(), and zypp::source::susetags::SuseTagsImpl::factoryInit().
| void zypp::source::SourceImpl::setAutorefresh | ( | bool | enable_r | ) |
| void zypp::source::SourceImpl::refresh | ( | ) |
Definition at line 788 of file SourceImpl.cc.
References _cache_dir, zypp::filesystem::clean_dir(), ERR, MIL, storeMetadata(), and ZYPP_RETHROW.
| void zypp::source::SourceImpl::storeMetadata | ( | const Pathname & | cache_dir_r | ) | [virtual] |
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl.
Definition at line 785 of file SourceImpl.cc.
Referenced by refresh().
| Date zypp::source::SourceImpl::timestamp | ( | ) | const [virtual] |
default implementation returns now() so the source is always reread when in doubt
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl.
Definition at line 266 of file SourceImpl.cc.
References zypp::Date::now().
| std::string zypp::source::SourceImpl::checksum | ( | ) | const [virtual] |
Definition at line 271 of file SourceImpl.cc.
References zypp::source::randomString().
Referenced by getPossiblyCachedMetadataFile(), and providePackage().
| std::string zypp::source::SourceImpl::alias | ( | void | ) | const [inline] |
Definition at line 209 of file SourceImpl.h.
References _alias.
Referenced by zypp::source::susetags::SuseTagsImpl::downloadNeeded(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), zypp::source::yum::YUMSourceImpl::saveMetadataTo(), zypp::source::susetags::SuseTagsImpl::saveMetadataTo(), and setAutorefresh().
| void zypp::source::SourceImpl::setAlias | ( | const std::string & | alias | ) | [inline] |
Definition at line 212 of file SourceImpl.h.
References _alias.
Referenced by zypp::source::susetags::SuseTagsImpl::factoryInit().
| std::string zypp::source::SourceImpl::id | ( | void | ) | const [virtual] |
Definition at line 838 of file SourceImpl.cc.
References _id.
Referenced by zypp::source::SourceImpl::Verifier::isDesiredMedia().
| void zypp::source::SourceImpl::setId | ( | const std::string | id_r | ) | [virtual] |
| unsigned zypp::source::SourceImpl::priority | ( | void | ) | const [virtual] |
| void zypp::source::SourceImpl::setPriority | ( | unsigned | p | ) | [virtual] |
| unsigned zypp::source::SourceImpl::priorityUnsubscribed | ( | void | ) | const [virtual] |
| void zypp::source::SourceImpl::setPriorityUnsubscribed | ( | unsigned | p | ) | [virtual] |
| bool zypp::source::SourceImpl::subscribed | ( | void | ) | const [virtual] |
| void zypp::source::SourceImpl::setSubscribed | ( | bool | s | ) | [virtual] |
| const Pathname & zypp::source::SourceImpl::cacheDir | ( | void | ) | [virtual] |
| const std::list< Pathname > zypp::source::SourceImpl::publicKeys | ( | ) | [virtual] |
Reimplemented in zypp::source::susetags::SuseTagsImpl.
Definition at line 923 of file SourceImpl.cc.
| std::string zypp::source::SourceImpl::type | ( | void | ) | const [virtual] |
Reimplemented in zypp::source::plaindir::PlaindirImpl, zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl.
Definition at line 833 of file SourceImpl.cc.
Referenced by dumpOn().
| Url zypp::source::SourceImpl::url | ( | void | ) | const |
Definition at line 883 of file SourceImpl.cc.
References _url.
Referenced by zypp::source::plaindir::PlaindirImpl::createResolvables(), zypp::source::yum::YUMSourceImpl::downloadMetadata(), zypp::source::susetags::SuseTagsImpl::downloadMetadata(), zypp::source::yum::YUMSourceImpl::downloadNeeded(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), zypp::source::plaindir::PlaindirImpl::factoryInit(), getPossiblyCachedMetadataFile(), provideFile(), setAutorefresh(), and setUrl().
| void zypp::source::SourceImpl::setUrl | ( | const Url & | url | ) |
| bool zypp::source::SourceImpl::remote | ( | ) | const |
Definition at line 893 of file SourceImpl.cc.
References _url, zypp::media::MediaManager::downloads(), and ZYPP_CAUGHT.
| bool zypp::source::SourceImpl::baseSource | ( | ) | const [inline] |
| const Pathname & zypp::source::SourceImpl::path | ( | void | ) | const |
Definition at line 908 of file SourceImpl.cc.
References _path.
Referenced by zypp::source::plaindir::PlaindirImpl::createResolvables(), zypp::source::susetags::SuseTagsImpl::downloadMetadata(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), and zypp::source::plaindir::PlaindirImpl::factoryInit().
| unsigned zypp::source::SourceImpl::numberOfMedia | ( | void | ) | const [virtual] |
Reimplemented in zypp::source::susetags::SuseTagsImpl.
Definition at line 913 of file SourceImpl.cc.
| std::string zypp::source::SourceImpl::vendor | ( | void | ) | const [virtual] |
Reimplemented in zypp::source::susetags::SuseTagsImpl.
Definition at line 918 of file SourceImpl.cc.
Referenced by zypp::source::SourceImpl::Verifier::isDesiredMedia().
| std::string zypp::source::SourceImpl::unique_id | ( | void | ) | const [virtual] |
Reimplemented in zypp::source::susetags::SuseTagsImpl.
Definition at line 928 of file SourceImpl.cc.
| std::string zypp::source::SourceImpl::zmdName | ( | void | ) | const [virtual] |
| void zypp::source::SourceImpl::setZmdName | ( | const std::string | name_r | ) | [virtual] |
Definition at line 943 of file SourceImpl.cc.
| std::string zypp::source::SourceImpl::zmdDescription | ( | void | ) | const [virtual] |
Definition at line 948 of file SourceImpl.cc.
| void zypp::source::SourceImpl::setZmdDescription | ( | const std::string | desc_r | ) | [virtual] |
Definition at line 953 of file SourceImpl.cc.
| void zypp::source::SourceImpl::redirect | ( | unsigned | media_nr, | |
| const Url & | new_url | |||
| ) | [virtual] |
Definition at line 807 of file SourceImpl.cc.
References _media_set, DBG, media_mgr, and zypp::media::MediaManager::open().
| void zypp::source::SourceImpl::reattach | ( | const Pathname & | attach_point | ) |
Reattach the source if it is not mounted, but downloaded, to different directory.
| Exception |
Definition at line 813 of file SourceImpl.cc.
References _media_set, and DBG.
| void zypp::source::SourceImpl::release | ( | ) |
Release all medias attached by the source.
Definition at line 819 of file SourceImpl.cc.
References _media_set.
| media::MediaVerifierRef zypp::source::SourceImpl::verifier | ( | unsigned | media_nr | ) | [virtual] |
Get media verifier for the specified medium.
In the default installation, an instance of media::NoVerifier is returned. The specific implementations of the sources should overload this method to return a proper verifier.
| media_nr | number of the medium |
Definition at line 825 of file SourceImpl.cc.
| std::set< zypp::Resolvable::Kind > zypp::source::SourceImpl::resolvableKinds | ( | ) | const [virtual] |
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl.
Definition at line 248 of file SourceImpl.cc.
| Source_Ref zypp::source::SourceImpl::selfSourceRef | ( | ) | [inline] |
Provide Source_Ref back to this.
Definition at line 279 of file SourceImpl.h.
Referenced by zypp::source::yum::YUMSourceImpl::createResolvables(), zypp::source::plaindir::PlaindirImpl::createResolvables(), zypp::source::yum::YUMSourceImpl::downloadMetadata(), factoryCtor(), provideFile(), zypp::source::yum::YUMSourceImpl::providePackages(), zypp::source::susetags::SuseTagsImpl::providePackages(), zypp::source::yum::YUMSourceImpl::providePatches(), zypp::source::yum::YUMSourceImpl::providePatterns(), zypp::source::yum::YUMSourceImpl::provideProducts(), zypp::source::yum::YUMSourceImpl::provideResolvablesByKind(), zypp::source::yum::YUMSourceImpl::provideSelections(), zypp::source::yum::YUMSourceImpl::readRepomd(), and resolvables().
| const Pathname zypp::source::SourceImpl::provideJustFile | ( | const Pathname & | path, | |
| const unsigned | media_nr = 1, |
|||
| bool | cached = false, |
|||
| bool | checkonly = false | |||
| ) | [protected] |
Provide a file to local filesystem on the given path, no checking or progress information redirection.
used by provideFile and providePackage. If checkonly is true, no media change callback will be invoked.
| path | file with a path to be provided by the source | |
| media_nr | number of the media to look for the path | |
| cached | provide a cached copy of the file, if available | |
| checkonly | just check if it is possible to provide the file |
| Exception |
Definition at line 495 of file SourceImpl.cc.
References _media_set, zypp::media::MediaChangeReport::ABORT, zypp::media::MediaChangeReport::CHANGE_URL, zypp::SourceFactory::createFrom(), DBG, zypp::media::MediaChangeReport::EJECT, ERR, zypp::media::MediaChangeReport::IGNORE, zypp::media::MediaChangeReport::INVALID, zypp::media::MediaManager::localPath(), media_mgr, MIL, zypp::media::MediaChangeReport::NOT_FOUND, zypp::media::MediaManager::provideFile(), zypp::media::MediaManager::release(), report, zypp::media::MediaChangeReport::RETRY, zypp::SourceManager::sourceManager(), zypp::media::MediaChangeReport::WRONG, ZYPP_CAUGHT, ZYPP_RETHROW, and ZYPP_THROW.
Referenced by provideFile(), and providePackage().
| void zypp::source::SourceImpl::copyLocalMetadata | ( | const Pathname & | src, | |
| const Pathname & | dst | |||
| ) | const [protected] |
Definition at line 475 of file SourceImpl.cc.
References zypp::filesystem::assert_dir(), zypp::filesystem::clean_dir(), zypp::filesystem::copy_dir_content(), MIL, and ZYPP_THROW.
Referenced by zypp::source::yum::YUMSourceImpl::saveMetadataTo(), zypp::source::susetags::SuseTagsImpl::saveMetadataTo(), zypp::source::yum::YUMSourceImpl::storeMetadata(), and zypp::source::susetags::SuseTagsImpl::storeMetadata().
| Pathname zypp::source::SourceImpl::tmpMetadataDir | ( | ) | const [protected] |
function that creates the tmp metadata dir if it was not created.
this directory is used when cache_dir is not set (design flaw FIXME)
Definition at line 259 of file SourceImpl.cc.
References _tmp_metadata_dir_ptr.
Referenced by zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), zypp::source::yum::YUMSourceImpl::metadataRoot(), zypp::source::susetags::SuseTagsImpl::metadataRoot(), zypp::source::yum::YUMSourceImpl::storeMetadata(), and zypp::source::susetags::SuseTagsImpl::storeMetadata().
| void zypp::source::SourceImpl::resetMediaVerifier | ( | ) | [protected] |
reset the media verifier to no verifier
Definition at line 406 of file SourceImpl.cc.
References _media_set, zypp::media::MediaManager::addVerifier(), zypp::media::MediaManager::delVerifier(), media_mgr, MIL, WAR, and ZYPP_CAUGHT.
Referenced by zypp::source::susetags::SuseTagsImpl::downloadMetadata(), and zypp::source::yum::YUMSourceImpl::factoryInit().
| void zypp::source::SourceImpl::getPossiblyCachedMetadataFile | ( | const Pathname & | file_to_download, | |
| const Pathname & | destination, | |||
| const Pathname & | cached_file, | |||
| const CheckSum & | checksum | |||
| ) | [protected] |
checks if a file exists in cache if no, downloads it, copies it in given destination, and check matching checksum if yes, compares checksum and copies it to destination locally
| EXCEPTION | on download/copy failure and user abort |
Definition at line 354 of file SourceImpl.cc.
References zypp::ui::asString(), checksum(), zypp::filesystem::copy(), zypp::filesystem::is_checksum(), MIL, N_, provideFile(), report, url(), ZYPP_CAUGHT, and ZYPP_THROW.
Referenced by zypp::source::yum::YUMSourceImpl::downloadMetadata(), and zypp::source::susetags::SuseTagsImpl::downloadMetadata().
| void zypp::source::SourceImpl::factoryInit | ( | ) | [protected, virtual] |
Ctor substitute invoked by factoryCtor.
Derived implementations use this to load the metadata.
Baseclass implementation could do tasks which are common to all sources.
| EXCEPTION | on fail |
Reimplemented in zypp::source::plaindir::PlaindirImpl, zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl.
Definition at line 196 of file SourceImpl.cc.
References ZYPP_THROW.
Referenced by factoryCtor().
| std::ostream & zypp::source::SourceImpl::dumpOn | ( | std::ostream & | str | ) | const [protected, virtual] |
Overload to realize stream output.
Reimplemented from zypp::base::ReferenceCounted.
Reimplemented in zypp::source::susetags::SuseTagsImpl.
Definition at line 960 of file SourceImpl.cc.
References _alias, _autorefresh, _cache_dir, _enabled, _path, _url, zypp::base::ProvideNumericId< _Derived, _NumericIdType >::numericId(), and type().
Referenced by zypp::source::susetags::SuseTagsImpl::dumpOn().
| void zypp::source::SourceImpl::createResolvables | ( | Source_Ref | source_r | ) | [private, virtual] |
Late initialize the ResStore.
Reimplemented in zypp::source::plaindir::PlaindirImpl, zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl.
Definition at line 774 of file SourceImpl.cc.
References WAR.
Referenced by resolvables().
| ResStore zypp::source::SourceImpl::provideResolvablesByKind | ( | Source_Ref | source_r, | |
| zypp::Resolvable::Kind | kind | |||
| ) | [private, virtual] |
Provide only resolvable of a certain kind.
Reimplemented in zypp::source::yum::YUMSourceImpl.
Definition at line 779 of file SourceImpl.cc.
References WAR.
Referenced by resolvables().
| bool zypp::source::SourceImpl::resStoreInitialized | ( | ) | const [inline] |
Whether the ResStore is initialized.
If we know that noone has seen the resolvables yet, we can skip them too, eg. when deleting a source. (#174840)
Definition at line 401 of file SourceImpl.h.
References _res_store_initialized.
| static SourceImpl_Ptr zypp::source::SourceImpl::nullimpl | ( | ) | [inline, static] |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const SourceImpl & | obj | |||
| ) | [friend] |
Definition at line 107 of file SourceImpl.h.
Referenced by changeMedia(), dirInfo(), factoryCtor(), provideDirTree(), provideJustFile(), zypp::source::susetags::SuseTagsImpl::readMediaFile(), redirect(), releaseDir(), releaseFile(), resetMediaVerifier(), tryToProvideFile(), and ~SourceImpl().
ResStore zypp::source::SourceImpl::_store [protected] |
All resolvables provided by this source.
Definition at line 329 of file SourceImpl.h.
Referenced by zypp::source::yum::YUMSourceImpl::createResolvables(), zypp::source::susetags::SuseTagsImpl::createResolvables(), zypp::source::plaindir::PlaindirImpl::createResolvables(), factoryCtor(), zypp::source::yum::YUMSourceImpl::providePatches(), zypp::source::susetags::SuseTagsImpl::providePatterns(), and resolvables().
Url zypp::source::SourceImpl::_url [protected] |
URL of the media.
Definition at line 331 of file SourceImpl.h.
Referenced by changeMedia(), dumpOn(), factoryCtor(), remote(), setUrl(), and url().
Pathname zypp::source::SourceImpl::_path [protected] |
Path to the source on the media.
Definition at line 333 of file SourceImpl.h.
Referenced by changeMedia(), zypp::source::yum::YUMSourceImpl::downloadMetadata(), zypp::source::susetags::SuseTagsImpl::downloadMetadata(), zypp::source::yum::YUMSourceImpl::downloadNeeded(), dumpOn(), factoryCtor(), path(), and zypp::source::susetags::SuseTagsImpl::readContentFile().
bool zypp::source::SourceImpl::_enabled [protected] |
bool zypp::source::SourceImpl::_autorefresh [protected] |
If the source metadata should be autorefreshed.
Definition at line 337 of file SourceImpl.h.
Referenced by autorefresh(), dumpOn(), factoryCtor(), and setAutorefresh().
std::string zypp::source::SourceImpl::_alias [protected] |
(user defined) alias of the source
Definition at line 339 of file SourceImpl.h.
Referenced by alias(), dumpOn(), factoryCtor(), and setAlias().
Pathname zypp::source::SourceImpl::_cache_dir [protected] |
Directory holding metadata cache.
Definition at line 341 of file SourceImpl.h.
Referenced by cacheDir(), zypp::source::yum::YUMSourceImpl::cacheExists(), zypp::source::susetags::SuseTagsImpl::cacheExists(), zypp::source::yum::YUMSourceImpl::downloadMetadata(), zypp::source::susetags::SuseTagsImpl::downloadMetadata(), dumpOn(), factoryCtor(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), zypp::source::yum::YUMSourceImpl::metadataRoot(), zypp::source::susetags::SuseTagsImpl::metadataRoot(), refresh(), zypp::source::yum::YUMSourceImpl::storeMetadata(), and zypp::source::susetags::SuseTagsImpl::storeMetadata().
std::string zypp::source::SourceImpl::_id [protected] |
(user defined) id of the source mostly used for ZENworks
Definition at line 344 of file SourceImpl.h.
unsigned zypp::source::SourceImpl::_priority [protected] |
(user defined) default priority of the source
Definition at line 346 of file SourceImpl.h.
Referenced by priority(), and setPriority().
unsigned zypp::source::SourceImpl::_priority_unsubscribed [protected] |
(user defined) unsubscribed priority of the source
Definition at line 348 of file SourceImpl.h.
Referenced by priorityUnsubscribed(), and setPriorityUnsubscribed().
bool zypp::source::SourceImpl::_subscribed [protected] |
subscribed?, solver prefers subscribed sources
Definition at line 350 of file SourceImpl.h.
Referenced by factoryCtor(), setSubscribed(), and subscribed().
bool zypp::source::SourceImpl::_base_source [protected] |
source contains base product?
Definition at line 352 of file SourceImpl.h.
Referenced by baseSource(), and factoryCtor().
shared_ptr<filesystem::TmpDir> zypp::source::SourceImpl::_tmp_metadata_dir_ptr [mutable, private] |
intrusive_ptr<MediaSet> zypp::source::SourceImpl::_media_set [protected] |
Set of medias of the product.
Definition at line 384 of file SourceImpl.h.
Referenced by changeMedia(), dirInfo(), factoryCtor(), provideDirTree(), provideJustFile(), zypp::source::susetags::SuseTagsImpl::readMediaFile(), reattach(), redirect(), release(), releaseDir(), releaseFile(), resetMediaVerifier(), tryToProvideFile(), and ~SourceImpl().
bool zypp::source::SourceImpl::_res_store_initialized [private] |
Whether the ResStore is initialized.
Definition at line 394 of file SourceImpl.h.
Referenced by resolvables(), and resStoreInitialized().
1.5.0