enlarged interface for additional requirements/conflicts
authorStefan Schubert <schubi@suse.de>
Tue, 4 Dec 2007 16:34:02 +0000 (16:34 +0000)
committerStefan Schubert <schubi@suse.de>
Tue, 4 Dec 2007 16:34:02 +0000 (16:34 +0000)
zypp/Resolver.cc
zypp/Resolver.h
zypp/solver/detail/Resolver.cc
zypp/solver/detail/Resolver.h

index 102f109a8083ec00852bd4a91decaceb3f69db43..aac6dec52268e6cfa5cb7a2738abc299b50835b1 100644 (file)
@@ -103,7 +103,15 @@ namespace zypp
   void Resolver::addRequire (const Capability & capability)
   { _pimpl->addExtraCapability( capability ); }
   void Resolver::addConflict (const Capability & capability)
-  { _pimpl->addExtraConflict( capability ); }          
+  { _pimpl->addExtraConflict( capability ); }
+  void Resolver::removeRequire (const Capability & capability)
+  { _pimpl->removeExtraCapability( capability ); }
+  void Resolver::removeConflict (const Capability & capability)
+  { _pimpl->removeExtraConflict( capability ); }
+  const CapSet Resolver::getRequire ()
+  { _pimpl->extraCapability();}
+  const CapSet Resolver::getConflict ()
+  { _pimpl->extraConflicts();}      
   std::list<PoolItem_Ref> Resolver::problematicUpdateItems( void ) const
   { return _pimpl->problematicUpdateItems(); }
   void Resolver::setTimeout( int seconds )
index b759e88149b498853d652e4963898b9cfb0bded1..0987b928f0e4b86b433ca97da284dcf150728c05 100644 (file)
@@ -212,7 +212,8 @@ namespace zypp
      * (More or less a 'single step' resolver call)
      *
      * returns false if requirements are not all fulfillable
-     *
+     * 
+     * Is obsolete; use resolvePool() instead
      */
     bool transactResObject( ResObject::constPtr robj, bool install = true);
 
@@ -225,6 +226,7 @@ namespace zypp
      *
      * returns false if any transactResObject() call returned false.
      *
+     * Is obsolete; use resolvePool() instead     
      */
     bool transactResKind( Resolvable::Kind kind );
 
@@ -235,6 +237,7 @@ namespace zypp
      * It will only reset states which have an equal or
      * lower causer
      *
+     * Is obsolete; use resolvePool() instead     
      */
     void transactReset( ResStatus::TransactByValue causer );
 
@@ -248,7 +251,31 @@ namespace zypp
      * Adding additional conflict
      *
      */
-    void addConflict (const Capability & capability);      
+    void addConflict (const Capability & capability);
+
+    /**
+     * Remove additional requirement
+     *
+     */
+    void removeRequire (const Capability & capability);
+
+    /**
+     * Remove additional conflict
+     *
+     */
+    void removeConflict (const Capability & capability);
+
+    /**
+     * Get additional requirement
+     *
+     */      
+    const CapSet getRequire ();
+      
+    /**
+     * Get additional conflict
+     *
+     */            
+    const CapSet getConflict();
       
     /**
      * Setting solver timeout
index a66a18d3e6756bdf4e2664d6ca8e8e5232b4a6ac..297799090cacd045f05f1e633d6c3a722b141f31 100644 (file)
@@ -439,7 +439,6 @@ Resolver::removeExtraCapability (const Capability & capability)
 }
 
 
-
 void
 Resolver::addExtraConflict (const Capability & capability)
 {
@@ -447,6 +446,13 @@ Resolver::addExtraConflict (const Capability & capability)
 }
 
 
+void
+Resolver::removeExtraConflict (const Capability & capability)
+{
+    _extra_conflicts.erase (capability);
+}
+
+
 void
 Resolver::addIgnoreConflict (const PoolItem_Ref item,
                   const Capability & capability)
index 00fdf2088fde670edc16431630a0f589a83538cf..f19fdbf188dae7708a2939a82d16773565f8952b 100644 (file)
@@ -234,6 +234,7 @@ class Resolver : public base::ReferenceCounted, private base::NonCopyable {
     void addExtraCapability (const Capability & capability);
     void removeExtraCapability (const Capability & capability);
     void addExtraConflict (const Capability & capability);
+    void removeExtraConflict (const Capability & capability);    
 
     const CapSet extraCapability () { return _extra_caps; }
     const CapSet extraConflicts () { return _extra_conflicts; }