////////////////////////////////////////////////////////////////////////////
- RepoStatus RepoManager::rawMetadataStatus( const RepoInfo &info )
+ RepoStatus RepoManager::metadataStatus( const RepoInfo &info ) const
{
Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
RepoType repokind = info.type();
}
Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
- oldstatus = rawMetadataStatus(info);
+ oldstatus = metadataStatus(info);
if ( ( repokind.toEnum() == RepoType::RPMMD_e ) ||
( repokind.toEnum() == RepoType::YAST2_e ) )
cache::CacheStore store(_pimpl->options.repoCachePath);
- RepoStatus raw_metadata_status = rawMetadataStatus(info);
+ RepoStatus raw_metadata_status = metadataStatus(info);
if ( raw_metadata_status.empty() )
{
ZYPP_THROW(RepoMetadataException(info));
////////////////////////////////////////////////////////////////////////////
- repo::RepoType RepoManager::probe( const Url &url )
+ repo::RepoType RepoManager::probe( const Url &url ) const
{
if ( url.getScheme() == "dir" && ! PathInfo( url.getPathName() ).isDir() )
{
return store.isCached(info.alias());
}
+ RepoStatus RepoManager::cacheStatus( const RepoInfo &info ) const
+ {
+ cache::CacheStore store(_pimpl->options.repoCachePath);
+ data::RecordId id = store.lookupRepository(info.alias());
+ RepoStatus cache_status = store.repositoryStatus(id);
+ return cache_status;
+ }
+
Repository RepoManager::createFromCache( const RepoInfo &info,
const ProgressData::ReceiverFnc & progressrcv )
{
std::list<RepoInfo> knownRepositories() const;
/**
+ * \short Status of local metadata
+ */
+ RepoStatus metadataStatus( const RepoInfo &info ) const;
+
+ /**
* \short Refresh local raw cache
*
* Will try to download the metadata
*/
void cleanMetadata( const RepoInfo &info,
const ProgressData::ReceiverFnc & progressrcv = ProgressData::ReceiverFnc() );
+
+ /**
+ * \short Status of metadata cache
+ */
+ RepoStatus cacheStatus( const RepoInfo &info ) const;
/**
* \short Refresh local cache
*
* \todo FIXME Should this be private?
*/
- repo::RepoType probe( const Url &url );
+ repo::RepoType probe( const Url &url ) const;
/**