- don't probe the repository type upon saving if disabled (#326769)
authorJan Kupec <jkupec@suse.cz>
Thu, 20 Sep 2007 15:37:19 +0000 (15:37 +0000)
committerJan Kupec <jkupec@suse.cz>
Thu, 20 Sep 2007 15:37:19 +0000 (15:37 +0000)
zypp/RepoManager.cc

index f1494a6..2568e00 100644 (file)
@@ -923,10 +923,13 @@ namespace zypp
     }
 
     RepoInfo tosave = info;
-    
+
     // check the first url for now
-    if ( ZConfig::instance().repo_add_probe() || ( tosave.type() == RepoType::NONE ) )
+    if ( ZConfig::instance().repo_add_probe()
+        || ( tosave.type() == RepoType::NONE && tosave.enabled()) )
     {
+      DBG << "unknown repository type, probing" << endl;
+
       RepoType probedtype;
       probedtype = probe(*tosave.baseUrlsBegin());
       if ( tosave.baseUrlsSize() > 0 )
@@ -937,7 +940,7 @@ namespace zypp
           tosave.setType(probedtype);
       }
     }
-    
+
     progress.set(50);
 
     // assert the directory exists