if ( ! nrepo.enabled() )
continue;
- if ( ! repoManager.isCached( nrepo ) || /*force*/false )
+ if ( ! repoManager.isCached( nrepo ) || nrepo.type() == repo::RepoType::RPMPLAINDIR )
{
if ( repoManager.isCached( nrepo ) )
{
SEC << "cleanCache" << endl;
repoManager.cleanCache( nrepo );
}
- //SEC << "refreshMetadata" << endl;
- //repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
+ SEC << "refreshMetadata" << endl;
+ repoManager.refreshMetadata( nrepo );
SEC << "buildCache" << endl;
repoManager.buildCache( nrepo );
}
}
}
- if ( 1 )
+ if ( 0 )
{
Measure x( "INIT TARGET" );
{
}
///////////////////////////////////////////////////////////////////
+
+void mksrc( const std::string & url, const std::string & alias, RepoManager & repoManager )
+{
+ RepoInfo nrepo;
+ nrepo
+ .setAlias( alias )
+ .setName( alias )
+ .setEnabled( true )
+ .setAutorefresh( false )
+ .addBaseUrl( Url(url) );
+
+ if ( ! repoManager.isCached( nrepo ) )
+ {
+ repoManager.buildCache( nrepo );
+ }
+
+ repoManager.loadFromCache( nrepo );
+}
+
+///////////////////////////////////////////////////////////////////
//
template<class _Condition>
struct SetTrue