Take care the last ServiceInfo::addRepoTo{Enable,Disable} call wins.
authorMichael Andres <ma@suse.de>
Wed, 3 Feb 2010 14:49:58 +0000 (15:49 +0100)
committerMichael Andres <ma@suse.de>
Wed, 3 Feb 2010 14:49:58 +0000 (15:49 +0100)
zypp/ServiceInfo.cc

index 75f2eb8..175caf2 100644 (file)
@@ -125,7 +125,10 @@ namespace zypp
   { return( _pimpl->reposToEnable.find( alias_r ) != _pimpl->reposToEnable.end() ); }
 
   void ServiceInfo::addRepoToEnable( const std::string & alias_r )
-  { _pimpl->reposToEnable.insert( alias_r ); }
+  {
+    _pimpl->reposToEnable.insert( alias_r );
+    _pimpl->reposToDisable.erase( alias_r );
+  }
 
   void ServiceInfo::delRepoToEnable( const std::string & alias_r )
   { _pimpl->reposToEnable.erase( alias_r ); }
@@ -150,7 +153,10 @@ namespace zypp
   { return( _pimpl->reposToDisable.find( alias_r ) != _pimpl->reposToDisable.end() ); }
 
   void ServiceInfo::addRepoToDisable( const std::string & alias_r )
-  { _pimpl->reposToDisable.insert( alias_r ); }
+  {
+    _pimpl->reposToDisable.insert( alias_r );
+    _pimpl->reposToEnable.erase( alias_r );
+  }
 
   void ServiceInfo::delRepoToDisable( const std::string & alias_r )
   { _pimpl->reposToDisable.erase( alias_r ); }