- zypper uses tribool internally. So autorefresh and enabled now
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 3 Aug 2007 15:18:55 +0000 (15:18 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 3 Aug 2007 15:18:55 +0000 (15:18 +0000)
  have this order of preference:
  - cmd line value
  - .repo file
  - zypp default

src/zypper-sources.cc

index dfb799d..f5de01f 100644 (file)
@@ -366,10 +366,10 @@ int add_repo_by_url( const zypp::Url & url, const string & alias,
   repo.setAlias(alias.empty() ? timestamp() : alias);
   repo.addBaseUrl(url);
   
-  if ( enabled != indeterminate )
-    repo.setEnabled(enabled);
-  if ( autorefresh != indeterminate )
-    repo.setAutorefresh(autorefresh);
+  if ( !indeterminate(enabled) )
+    repo.setEnabled((enabled == true));
+  if ( !indeterminate(autorefresh) )
+    repo.setAutorefresh((autorefresh == true));
     
   return add_repo(repo);
 }