From: Duncan Mac-Vicar P Date: Fri, 27 Jul 2007 11:30:41 +0000 (+0000) Subject: zconfig: default* -> *, they are not default anymore as the user can X-Git-Tag: BASE-SuSE-Linux-10_3-Branch~469 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7ab6ce1a8ec01934e78742f8c1115b96a189b3e;p=platform%2Fupstream%2Flibzypp.git zconfig: default* -> *, they are not default anymore as the user can set them in the conf file --- diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc index fafd979..ce7d069 100644 --- a/zypp/RepoManager.cc +++ b/zypp/RepoManager.cc @@ -57,9 +57,9 @@ namespace zypp RepoManagerOptions::RepoManagerOptions() { - repoCachePath = ZConfig::instance().defaultRepoCachePath(); - repoRawCachePath = ZConfig::instance().defaultRepoMetadataPath(); - knownReposPath = ZConfig::instance().defaultKnownReposPath(); + repoCachePath = ZConfig::instance().repoCachePath(); + repoRawCachePath = ZConfig::instance().repoMetadataPath(); + knownReposPath = ZConfig::instance().knownReposPath(); } //////////////////////////////////////////////////////////////////////////// diff --git a/zypp/TranslatedText.cc b/zypp/TranslatedText.cc index d6b7d8a..a8b44bb 100644 --- a/zypp/TranslatedText.cc +++ b/zypp/TranslatedText.cc @@ -52,7 +52,7 @@ namespace zypp Locale toReturn( lang ); if ( lang == Locale::noCode ) { - toReturn = ZConfig::instance().defaultTextLocale(); + toReturn = ZConfig::instance().textLocale(); } do diff --git a/zypp/ZConfig.cc b/zypp/ZConfig.cc index 9076a2e..c2c451e 100644 --- a/zypp/ZConfig.cc +++ b/zypp/ZConfig.cc @@ -151,24 +151,24 @@ namespace zypp // METHOD NAME : ZConfig::defaultTextLocale // METHOD TYPE : Locale // - Locale ZConfig::defaultTextLocale() const + Locale ZConfig::textLocale() const { return getZYpp()->getTextLocale(); } - Pathname ZConfig::defaultRepoMetadataPath() const + Pathname ZConfig::repoMetadataPath() const { return ( _pimpl->cfg_metadata_path.empty() ? Pathname("/var/cache/zypp/raw") : _pimpl->cfg_metadata_path ); } - Pathname ZConfig::defaultRepoCachePath() const + Pathname ZConfig::repoCachePath() const { return ( _pimpl->cfg_cache_path.empty() ? Pathname("/var/cache/zypp") : _pimpl->cfg_cache_path ); } - Pathname ZConfig::defaultKnownReposPath() const + Pathname ZConfig::knownReposPath() const { return ( _pimpl->cfg_known_repos_path.empty() ? Pathname("/etc/zypp/repos.d") : _pimpl->cfg_known_repos_path ); diff --git a/zypp/ZConfig.h b/zypp/ZConfig.h index 05c6af6..ec77784 100644 --- a/zypp/ZConfig.h +++ b/zypp/ZConfig.h @@ -48,24 +48,24 @@ namespace zypp /** The prefered locale for translated labels, descriptions, * descriptions, etc. passed to the UI. */ - Locale defaultTextLocale() const; + Locale textLocale() const; /** * Path where the repo metadata is downloaded and kept. */ - Pathname defaultRepoMetadataPath() const; + Pathname repoMetadataPath() const; /** * Path where the processed cache is kept * (this is where zypp.db is located. */ - Pathname defaultRepoCachePath() const; + Pathname repoCachePath() const; /** * Path where the known repositories * .repo files are kept */ - Pathname defaultKnownReposPath() const; + Pathname knownReposPath() const; /** * Separator string for storing/reading sets of strings to/from diff --git a/zypp/parser/susetags/RepoParser.cc b/zypp/parser/susetags/RepoParser.cc index f143d0b..65269b0 100644 --- a/zypp/parser/susetags/RepoParser.cc +++ b/zypp/parser/susetags/RepoParser.cc @@ -396,7 +396,7 @@ namespace zypp parseLocaleIf( Locale("en") ); // For each wanted locale at least // some fallback, if locale is not present. - parseLocaleIf( ZConfig::instance().defaultTextLocale() ); + parseLocaleIf( ZConfig::instance().textLocale() ); // Now process the rest of RepoIndex for ( RepoIndex::FileChecksumMap::const_iterator it = _repoIndex->metaFileChecksums.begin();