another case where we better refresh the metadata instead
authorStephan Kulow <coolo@suse.de>
Sun, 2 Mar 2008 16:25:50 +0000 (16:25 +0000)
committerStephan Kulow <coolo@suse.de>
Sun, 2 Mar 2008 16:25:50 +0000 (16:25 +0000)
of relying on the user to call refresh after having added
a repo

zypp/RepoManager.cc

index 8a522f1..687fc49 100644 (file)
@@ -675,7 +675,10 @@ namespace zypp
     RepoStatus raw_metadata_status = metadataStatus(info);
     if ( raw_metadata_status.empty() )
     {
-      ZYPP_THROW(RepoMetadataException(info));
+       /* if there is no cache at this point, we refresh the raw
+          in case this is the first time - if it's !autorefresh,
+          we may still refresh */
+      refreshMetadata(info, RefreshIfNeeded, progressrcv );
     }
 
     bool needs_cleaning = false;