grrr
authorJán Kupec <jkupec@suse.cz>
Fri, 15 Oct 2010 15:52:50 +0000 (17:52 +0200)
committerJán Kupec <jkupec@suse.cz>
Fri, 15 Oct 2010 15:52:50 +0000 (17:52 +0200)
src/repos.cc

index e25ece1..dfaab60 100644 (file)
@@ -520,19 +520,18 @@ void do_init_repos(Zypper & zypper, const Container & container)
   MIL << "Refreshing autorefresh services." << endl;
 
   const list<ServiceInfo> & services = manager.knownServices();
+  bool called_refresh = false;
   for_(s, services.begin(), services.end())
   {
-    bool called_refresh = false;
     if (s->enabled() && s->autorefresh())
     {
       refresh_service(zypper, *s);
       called_refresh = true;
     }
-
-    // reinitialize the repo manager to re-read the list of repos
-    if (called_refresh)
-      zypper.initRepoManager();
   }
+  // reinitialize the repo manager to re-read the list of repos
+  if (called_refresh)
+    zypper.initRepoManager();
 
   MIL << "Going to initialize repositories." << endl;