Author: dmacvicar Date: Mon Sep 24 16:15:00 2007 New Revision: 7343 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7343&view=rev Log: - Provide an api to get the metadata path. Needed to fix #293428 Modified: trunk/libzypp/VERSION.cmake trunk/libzypp/package/libzypp.changes trunk/libzypp/zypp/RepoManager.cc trunk/libzypp/zypp/RepoManager.h trunk/libzypp/zypp/repo/RepoProvideFile.cc Modified: trunk/libzypp/VERSION.cmake URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=7343&r1=7342&r2=7343&view=diff ============================================================================== --- trunk/libzypp/VERSION.cmake (original) +++ trunk/libzypp/VERSION.cmake Mon Sep 24 16:15:00 2007 @@ -45,6 +45,6 @@ # SET(LIBZYPP_MAJOR "3") -SET(LIBZYPP_MINOR "24") +SET(LIBZYPP_MINOR "25") SET(LIBZYPP_COMPATMINOR "24") -SET(LIBZYPP_PATCH "8") +SET(LIBZYPP_PATCH "0") Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=7343&r1=7342&r2=7343&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Mon Sep 24 16:15:00 2007 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Mon Sep 24 16:10:32 CEST 2007 - dmacvicar@suse.de + +- provide a way to retrieve the metadata path. Used for + installation, which incorrectly creates a repository in + cache without adding it first, so metadata path is not + set and therefore it is not possible to setup a media + verifier on installation. Part of fix for (#293428) +- 3.25.0 + +------------------------------------------------------------------- Mon Sep 24 15:48:47 CEST 2007 - schubi@suse.de - If more than one resolvables provide a requirements and have different Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=7343&r1=7342&r2=7343&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Mon Sep 24 16:15:00 2007 @@ -301,6 +301,13 @@ //////////////////////////////////////////////////////////////////////////// + Pathname RepoManager::metadataPath( const RepoInfo &info ) const + { + return rawcache_path_for_repoinfo(_pimpl->options, info ); + } + + //////////////////////////////////////////////////////////////////////////// + RepoStatus RepoManager::metadataStatus( const RepoInfo &info ) const { Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info ); Modified: trunk/libzypp/zypp/RepoManager.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=7343&r1=7342&r2=7343&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.h (original) +++ trunk/libzypp/zypp/RepoManager.h Mon Sep 24 16:15:00 2007 @@ -161,6 +161,19 @@ bool checkIfToRefreshMetadata( const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy = RefreshIfNeeded); + + /** + * \short Path where the metadata is downloaded and kept + * + * Given a repoinfo, tells where \ref RepoManager will download + * and keep the raw metadata. + * + * \param info Repository information + * + * \throws repo::RepoNoAliasException if can't figure an alias + */ + Pathname metadataPath( const RepoInfo &info ) const; + /** * \short Refresh local raw cache * Modified: trunk/libzypp/zypp/repo/RepoProvideFile.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/RepoProvideFile.cc?rev=7343&r1=7342&r2=7343&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/RepoProvideFile.cc (original) +++ trunk/libzypp/zypp/repo/RepoProvideFile.cc Mon Sep 24 16:15:00 2007 @@ -115,8 +115,9 @@ { RepoInfo info = repo.info(); // set a verifier if the repository has it + Pathname mediafile = info.metadataPath() + "/media.1/media"; - if ( ! mediafile.empty() ) + if ( ! info.metadataPath().empty() ) { if ( PathInfo(mediafile).isExist() ) { @@ -159,12 +160,12 @@ } else { - WAR << "No media verifier for repo '" << info.alias() << "'" << endl; + WAR << "No media verifier for repo '" << info.alias() << "' media/media.1 does not exist in '" << info.metadataPath() << "'" << endl; } } else { - MIL << "Unknown metadata path for repo '" << info.alias() << "'. Can't set media verifier."<< endl; + WAR << "'" << info.alias() << "' metadata path is empty. Can't set verifier. Probably this repository does not come from RepoManager." << endl; } } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org