backup
authorMichael Andres <ma@suse.de>
Thu, 10 Jul 2008 16:08:44 +0000 (16:08 +0000)
committerMichael Andres <ma@suse.de>
Thu, 10 Jul 2008 16:08:44 +0000 (16:08 +0000)
devel/devel.ma/NewPool.cc
devel/devel.ma/Tools.h

index 632fef6..5feb3f8 100644 (file)
@@ -489,15 +489,15 @@ try {
       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 );
       }
@@ -533,7 +533,7 @@ try {
     }
   }
 
-  if ( 1 )
+  if ( 0 )
   {
     Measure x( "INIT TARGET" );
     {
index a20d3e4..965f4b5 100644 (file)
@@ -45,6 +45,26 @@ void waitForInput()
 }
 
 ///////////////////////////////////////////////////////////////////
+
+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