fix to compile
authorMichael Andres <ma@suse.de>
Thu, 18 Sep 2008 13:23:15 +0000 (13:23 +0000)
committerMichael Andres <ma@suse.de>
Thu, 18 Sep 2008 13:23:15 +0000 (13:23 +0000)
zypp/sat/WhatObsoletes.h
zypp/sat/WhatProvides.cc
zypp/sat/WhatProvides.h
zypp/sat/detail/PoolImpl.h
zypp/solver/detail/SATResolver.cc

index 5911605..94282cf 100644 (file)
@@ -76,7 +76,7 @@ namespace zypp
 
         /** Iterator pointing behind the last \ref Solvable. */
         const_iterator end() const
-        { return const_iterator( 0 ); }
+        { return const_iterator(); }
 
       private:
         const sat::detail::IdType * _begin;
index b0c6736..b4c3b70 100644 (file)
@@ -25,65 +25,133 @@ namespace zypp
   { /////////////////////////////////////////////////////////////////
 
     ///////////////////////////////////////////////////////////////////
+    //
+    // CLASS NAME : WhatProvides::Impl
+    //
+    /** WhatProvides implementation date.
+     * Stores the offset into a O terminated Id array. Per default
+     * the satsolvers whatprovidesdata, otherwise private data.
+     *
+     * As the satsolvers whatprovidesdata might be realocated
+     * while iterating a result, the iterator takes an
+     * <tt>const IdType *const*</tt>. Thats why we explicitly
+     * provide _private and pass its adress to the iterator,
+     * even if private data are not reallocated.
+     */
+    class WhatProvides::Impl : protected detail::PoolMember
+    {
+      public:
+        Impl()
+        : _offset( 0 ), _private( 0 )
+        {}
+
+        Impl( unsigned offset_r )
+        : _offset( offset_r ), _private( 0 )
+        {}
+
+        Impl( const std::tr1::unordered_set<detail::IdType> & ids_r )
+        : _offset( 0 ), _private( 0 )
+        {
+           // use private data to store the result (incl. trailing NULL)
+          _pdata.reserve( ids_r.size()+1 );
+          _pdata.insert( _pdata.begin(), ids_r.begin(), ids_r.end() );
+          _pdata.push_back( detail::noId );
+
+          _private = &_pdata.front(); // ptr to 1st element
+        }
+
+      public:
+        unsigned                         _offset;
+        const detail::IdType *           _private;
+
+      private:
+        std::vector<sat::detail::IdType> _pdata;
+    };
+    ///////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////
     namespace
     { /////////////////////////////////////////////////////////////////
 
       /** WhatProvides ctor helper collecting providers from Capabilies. */
       template <class Iterator>
-      shared_ptr<void> allocatedProviders( Iterator begin_r, Iterator end_r, const sat::detail::IdType *& first_r )
+      void collectProviders( Iterator begin_r, Iterator end_r, std::tr1::unordered_set<detail::IdType> & collect_r )
       {
-        // use a set to unify the collected results
-        std::tr1::unordered_set<sat::detail::IdType> ids;
         for_( it, begin_r, end_r )
         {
           WhatProvides providers( *it );
           for_( prv, providers.begin(), providers.end() )
           {
-            ids.insert( prv->id() );
+            collect_r.insert( prv->id() );
           }
         }
-
-        if ( ids.empty() )
-        {
-          return shared_ptr<void>();
-        }
-
-        // use allocated private data to store the result (incl. trailing NULL)
-        std::vector<sat::detail::IdType> * pdata = new std::vector<sat::detail::IdType>( ids.size()+1, sat::detail::noId );
-        pdata->insert( pdata->begin(), ids.begin(), ids.end() );
-        first_r = &pdata->front();
-        return shared_ptr<void>( pdata );
       }
 
       /////////////////////////////////////////////////////////////////
-    } // namespace
+    } //namespace
     ///////////////////////////////////////////////////////////////////
 
-    WhatProvides::WhatProvides( Capability cap_r )
-    : _begin( myPool().whatProvides( cap_r ) )
+    WhatProvides::WhatProvides()
     {}
 
+    WhatProvides::WhatProvides( Capability cap_r )
+    {
+      unsigned res( myPool().whatProvides( cap_r ) );
+      if ( myPool().whatProvidesData( res ) )
+      {
+        _pimpl.reset( new Impl( res ) );
+      }
+      // else: no Impl for empty result.
+    }
+
     WhatProvides::WhatProvides( Capabilities caps_r )
-    : _begin( 0 )
-    , _private( allocatedProviders( caps_r.begin(), caps_r.end(), _begin ) )
-    {}
+    {
+      std::tr1::unordered_set<detail::IdType> ids;
+      collectProviders( caps_r.begin(), caps_r.end(), ids );
+      if ( ! ids.empty() )
+      {
+        _pimpl.reset( new Impl( ids ) );
+      }
+      // else: no Impl for empty result.
+   }
 
     WhatProvides::WhatProvides( const CapabilitySet & caps_r )
-    : _begin( 0 )
-    , _private( allocatedProviders( caps_r.begin(), caps_r.end(), _begin ) )
-    {}
+    {
+      std::tr1::unordered_set<detail::IdType> ids;
+      collectProviders( caps_r.begin(), caps_r.end(), ids );
+      if ( ! ids.empty() )
+      {
+        _pimpl.reset( new Impl( ids ) );
+      }
+      // else: no Impl for empty result.
+   }
+
+    bool WhatProvides::empty() const
+    {
+      return _pimpl; // Ctor asserts no Impl for empty result.
+    }
 
     WhatProvides::size_type WhatProvides::size() const
     {
-      if ( ! _begin )
+      if ( !_pimpl )
         return 0;
 
-      Capabilities::size_type ret = 0;
-      for ( const sat::detail::IdType * end = _begin; *end; ++end )
-      {
-        ++ret;
-      }
-      return ret;
+      size_type count = 0;
+      for_( it, begin(), end() )
+        ++count;
+      return count;
+    }
+
+    WhatProvides::const_iterator WhatProvides::begin() const
+    {
+      if ( !_pimpl )
+        return const_iterator();
+
+      if ( _pimpl->_private )
+        return const_iterator( _pimpl->_private );
+
+      // for satsolvers index use one more indirection, as it might get relocated.
+      return const_iterator( &myPool().getPool()->whatprovidesdata, _pimpl->_offset );
     }
 
     /******************************************************************
index 1f827d6..9c6ebdf 100644 (file)
@@ -93,9 +93,7 @@ namespace zypp
 
       public:
         /** Default ctor */
-        WhatProvides()
-        : _begin( 0 )
-        {}
+        WhatProvides();
 
         /** Ctor from \ref Capability. */
         explicit
@@ -111,8 +109,7 @@ namespace zypp
 
      public:
         /** Whether the container is empty. */
-        bool empty() const
-        { return ! ( _begin && *_begin ); }
+        bool empty() const;
 
         /** Number of solvables inside. */
         size_type size() const;
@@ -127,8 +124,8 @@ namespace zypp
         const_iterator end() const;
 
       private:
-        const sat::detail::IdType * _begin;
-        shared_ptr<void> _private;
+        struct Impl;
+        RW_pointer<Impl> _pimpl;
     };
     ///////////////////////////////////////////////////////////////////
 
@@ -142,7 +139,9 @@ namespace zypp
     // CLASS NAME : WhatProvides::const_iterator
     //
     /** \ref WhatProvides iterator.
-     * Iterate a NULL terminated sat::detail::IdType array.
+     * Iterate a NULL terminated sat::detail::IdType array. Ctor gets
+     * the adress of a pointer to the array, and offset into the array.
+     * This is needed in case the array gets reallocated.
      */
     class WhatProvidesIterator : public boost::iterator_adaptor<
           WhatProvidesIterator         // Derived
@@ -154,38 +153,52 @@ namespace zypp
     {
       public:
         WhatProvidesIterator()
-        : iterator_adaptor_( 0 )
+        : iterator_adaptor_( 0 ), _baseRef( 0 ), _offset( 0 )
+        {}
+
+        /** Ctor with pointer to 1st elemment of an array.
+         * Use otherwise unused base as pointer for _baseRef. */
+        explicit WhatProvidesIterator( const detail::IdType *const base_r, unsigned offset_r = 0 )
+        : iterator_adaptor_( base_r ), _baseRef( base_r ? &base_reference() : 0 ), _offset( offset_r )
         {}
 
-        explicit WhatProvidesIterator( const sat::detail::IdType * _idx )
-        : iterator_adaptor_( _idx )
+        /** Ctor with pointer to pointer to 1st elemment of an array.
+         * Required for arrays that might be relocated whlite iterating (
+        */
+        explicit WhatProvidesIterator( const detail::IdType *const* baseRef_r, unsigned offset_r )
+        : iterator_adaptor_( 0 ), _baseRef( baseRef_r ), _offset( offset_r )
         {}
 
       private:
         friend class boost::iterator_core_access;
 
         reference dereference() const
-        { return ( base() ) ? Solvable( *base() ) : Solvable::noSolvable; }
-
+        { return Solvable( getId() ); }
+#if 0
         template <class OtherDerived, class OtherIterator, class V, class C, class R, class D>
         bool equal( const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs ) const
-        { // NULL pointer is eqal pointer to Id 0
-          return ( base() == rhs.base() // includes both NULL...
-              || ( !rhs.base() && !*base()     )
-              || ( !base()     && !*rhs.base() ) );
+#endif
+        bool equal( const WhatProvidesIterator & rhs ) const
+        { // NULL pointer is eqal Id 0
+          return ( ! ( getId() || rhs.getId() ) // both @end
+                   || ( _baseRef == rhs._baseRef && _offset == rhs._offset ) );
         }
 
         void increment()
-        { ++base_reference(); }
+        { ++_offset; }
+
+        detail::IdType getId() const
+        { return _baseRef ? (*_baseRef)[_offset] : detail::noId; }
+
+      private:
+        const detail::IdType *const*const _baseRef;
+        unsigned                          _offset;
     };
     ///////////////////////////////////////////////////////////////////
     }
 
-    inline WhatProvides::const_iterator WhatProvides::begin() const
-    { return const_iterator( _begin ); }
-
     inline WhatProvides::const_iterator WhatProvides::end() const
-    { return const_iterator( 0 ); }
+    { return const_iterator(); }
 
     /////////////////////////////////////////////////////////////////
   } // namespace sat
index 0636d57..e6c8f11 100644 (file)
@@ -179,7 +179,16 @@ namespace zypp
           { _repoinfos.erase( id_r ); }
 
         public:
-          const sat::detail::IdType * whatProvides( Capability cap_r )
+          /** Returns the id stored at \c offset_r in the internal
+           * whatprovidesdata array.
+          */
+          const sat::detail::IdType whatProvidesData( unsigned offset_r )
+          { return _pool->whatprovidesdata[offset_r]; }
+
+          /** Returns offset into the internal whatprovidesdata array.
+           * Use \ref whatProvidesData to get the stored Id.
+          */
+          unsigned whatProvides( Capability cap_r )
           { prepare(); return ::pool_whatprovides( _pool, cap_r.id() ); }
 
         public:
index d8af232..69dcd56 100644 (file)
@@ -47,7 +47,7 @@ extern "C" {
 #include "satsolver/poolvendor.h"
 #include "satsolver/policy.h"
 #include "satsolver/bitmap.h"
-#include "satsolver/queue.h"        
+#include "satsolver/queue.h"
 }
 
 /////////////////////////////////////////////////////////////////////////
@@ -100,14 +100,14 @@ itemToString (PoolItem item, bool shortVersion)
     }
     return os.str();
 }
-       
+
 
 //---------------------------------------------------------------------------
 
 std::ostream &
 SATResolver::dumpOn( std::ostream & os ) const
 {
-    os << "<resolver>" << endl;            
+    os << "<resolver>" << endl;
     if (_solv) {
        os << "  fixsystem = " << _solv->fixsystem << endl;
        os << "  allowdowngrade = " << _solv->allowdowngrade << endl;
@@ -208,7 +208,7 @@ SATResolver::resetItemTransaction (PoolItem item)
                break;
            }
        }
-    }        
+    }
 }
 
 
@@ -233,7 +233,7 @@ SATResolver::addPoolItemsToInstallFromList (PoolItemList & rl)
 void
 SATResolver::addPoolItemToRemove (PoolItem item)
 {
-    resetItemTransaction (item);    
+    resetItemTransaction (item);
     _items_to_remove.push_back (item);
     _items_to_remove.unique ();
 }
@@ -250,7 +250,7 @@ SATResolver::addPoolItemsToRemoveFromList (PoolItemList & rl)
 void
 SATResolver::addPoolItemToLock (PoolItem item)
 {
-    resetItemTransaction (item);    
+    resetItemTransaction (item);
     _items_to_lock.push_back (item);
     _items_to_lock.unique ();
 }
@@ -258,7 +258,7 @@ SATResolver::addPoolItemToLock (PoolItem item)
 void
 SATResolver::addPoolItemToKeep (PoolItem item)
 {
-    resetItemTransaction (item);    
+    resetItemTransaction (item);
     _items_to_keep.push_back (item);
     _items_to_keep.unique ();
 }
@@ -271,7 +271,7 @@ SATResolver::addPoolItemToKeep (PoolItem item)
 static void
 SATSolutionToPool (PoolItem item, const ResStatus & status, const ResStatus::TransactByValue causer)
 {
-    // resetting 
+    // resetting
     item.status().resetTransact (causer);
     item.status().resetWeak ();
 
@@ -290,26 +290,26 @@ SATSolutionToPool (PoolItem item, const ResStatus & status, const ResStatus::Tra
        r = item.status().setToBeUninstalled (causer);
        _XDEBUG("SATSolutionToPool(" << item << ", " << status << ") remove !" << r);
     }
-    
+
     return;
 }
 
 
 //----------------------------------------------------------------------------
-// helper functions for distupgrade 
+// helper functions for distupgrade
 //----------------------------------------------------------------------------
 
 bool SATResolver::doesObsoleteItem (PoolItem candidate, PoolItem installed) {
   Solvable *sCandidate = _SATPool->solvables + candidate.satSolvable().id();
   ::_Repo *installedRepo = sat::Pool::instance().systemRepo().get();
-  
-  Id p, *pp, obsolete, *obsoleteIt;
-  
+
+  Id p, pp, obsolete, *obsoleteIt;
+
   if ((!installedRepo || sCandidate->repo != installedRepo) && sCandidate->obsoletes) {
       obsoleteIt = sCandidate->repo->idarraydata + sCandidate->obsoletes;
       while ((obsolete = *obsoleteIt++) != 0)
       {
-         for (pp = pool_whatprovides(_SATPool, obsolete) ; (p = *pp++) != 0; ) {
+         for (pp = pool_whatprovides(_SATPool, obsolete); (p = _SATPool->whatprovidesdata[pp++]) != 0; ) {
              if (p > 0 &&  installed.satSolvable().id() == (sat::detail::SolvableIdType)p) {
                  MIL << candidate << " obsoletes " << installed << endl;
                  return true;
@@ -419,7 +419,7 @@ class CollectNonePackages : public resfilter::PoolItemFilterFunctor
     CollectNonePackages( Queue *queue )
        :solvableQueue (queue)
     {}
-    
+
     // collecting none packges
 
     bool operator()( PoolItem item )
@@ -445,9 +445,9 @@ SATResolver::solving()
     _solv->dosplitprovides = _dosplitprovides;
     _solv->noupdateprovide = _noupdateprovide;
     _solv->dontinstallrecommended = _onlyRequires;
-    _solv->distupgrade = _distupgrade;                 
+    _solv->distupgrade = _distupgrade;
     _solv->distupgrade_removeunsupported = _distupgrade_removeunsupported;
-    
+
     sat::Pool::instance().prepare();
 
     // Solve !
@@ -500,7 +500,7 @@ SATResolver::solving()
          } else {
              SATSolutionToPool (poolItem, ResStatus::toBeUninstalled, ResStatus::SOLVER);
          }
-         _result_items_to_remove.push_back (poolItem);   
+         _result_items_to_remove.push_back (poolItem);
       } else {
          ERR << "id " << i << " not found in ZYPP pool." << endl;
       }
@@ -517,7 +517,7 @@ SATResolver::solving()
       PoolItem poolItem = _pool.find (sat::Solvable(p));
       if (poolItem) {
          poolItem.status().setRecommended(true);
-         _XDEBUG("SATSolutionToPool(" << poolItem << ") recommended !");         
+         _XDEBUG("SATSolutionToPool(" << poolItem << ") recommended !");
       } else {
          ERR << "id " << p << " not found in ZYPP pool." << endl;
       }
@@ -544,7 +544,7 @@ SATResolver::solving()
     Map installedmap;
     Queue flags, solvableQueue;
 
-    queue_init(&flags);    
+    queue_init(&flags);
     queue_init(&solvableQueue);
 
     CollectNonePackages collectNonePackages(&solvableQueue);
@@ -556,8 +556,8 @@ SATResolver::solving()
     pool_trivial_installable(_solv->pool, _solv->installed, &installedmap, &solvableQueue, &flags);
     for (int i = 0; i < solvableQueue.count; i++) {
        PoolItem item = _pool.find (sat::Solvable(solvableQueue.elements[i]));
-       item.status().setUndetermined();        
-    
+       item.status().setUndetermined();
+
        if (flags.elements[i] == -1) {
            item.status().setNonRelevant();
            _XDEBUG("SATSolutionToPool(" << item << " ) nonRelevant !");
@@ -566,7 +566,7 @@ SATResolver::solving()
            _XDEBUG("SATSolutionToPool(" << item << " ) satisfied !");
        } else if (flags.elements[i] == 0) {
            item.status().setBroken();
-           _XDEBUG("SATSolutionToPool(" << item << " ) broken !");                 
+           _XDEBUG("SATSolutionToPool(" << item << " ) broken !");
        }
     }
 
@@ -575,10 +575,10 @@ SATResolver::solving()
        ERR << "Solverrun finished with an ERROR" << endl;
        return false;
     }
-    
+
     map_free(&installedmap);
     queue_free(&(solvableQueue));
-    queue_free(&flags);    
+    queue_free(&flags);
 
     return true;
 }
@@ -588,7 +588,7 @@ void
 SATResolver::solverInit(const PoolItemList & weakItems)
 {
     SATCollectTransact info (*this);
-    
+
     MIL << "SATResolver::solverInit()" << endl;
 
     if (_solv) {
@@ -606,7 +606,7 @@ SATResolver::solverInit(const PoolItemList & weakItems)
 
     invokeOnEach ( _pool.begin(), _pool.end(),
                   functor::functorRef<bool,PoolItem>(info) );
-    
+
     for (PoolItemList::const_iterator iter = weakItems.begin(); iter != weakItems.end(); iter++) {
        Id id = (*iter)->satSolvable().id();
        if (id == ID_NULL) {
@@ -614,7 +614,7 @@ SATResolver::solverInit(const PoolItemList & weakItems)
        }
        MIL << "Weaken dependencies of " << *iter << endl;
        queue_push( &(_jobQueue), SOLVER_WEAKEN_SOLVABLE_DEPS );
-        queue_push( &(_jobQueue), id );        
+        queue_push( &(_jobQueue), id );
     }
 
     // Add rules for parallel installable resolvables with different versions
@@ -631,7 +631,7 @@ SATResolver::solverEnd()
     // cleanup
     solver_free(_solv);
     _solv = NULL;
-    queue_free( &(_jobQueue) );    
+    queue_free( &(_jobQueue) );
 }
 
 
@@ -641,10 +641,10 @@ SATResolver::resolvePool(const CapabilitySet & requires_caps,
                         const PoolItemList & weakItems)
 {
     MIL << "SATResolver::resolvePool()" << endl;
-    
+
     // initialize
     solverInit(weakItems);
-    
+
     for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
        Id id = (*iter)->satSolvable().id();
        if (id == ID_NULL) {
@@ -690,7 +690,7 @@ SATResolver::resolvePool(const CapabilitySet & requires_caps,
     // cleanup
     if (ret)
        solverEnd(); // remove solver only if no errors happend. Need it for solving problems
-    
+
     MIL << "SATResolver::resolvePool() done. Ret:" << ret <<  endl;
     return ret;
 }
@@ -701,7 +701,7 @@ SATResolver::resolveQueue(const SolverQueueItemList &requestQueue,
                          const PoolItemList & weakItems)
 {
     MIL << "SATResolver::resolvQueue()" << endl;
-    
+
     // initialize
     solverInit(weakItems);
 
@@ -709,7 +709,7 @@ SATResolver::resolveQueue(const SolverQueueItemList &requestQueue,
     for (SolverQueueItemList::const_iterator iter = requestQueue.begin(); iter != requestQueue.end(); iter++) {
        (*iter)->addRule(_jobQueue);
     }
-    
+
     // Add addition item status to the resolve-queue cause these can be set by problem resolutions
     for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
        Id id = (*iter)->satSolvable().id();
@@ -730,7 +730,7 @@ SATResolver::resolveQueue(const SolverQueueItemList &requestQueue,
 
     // set requirements for a running system
     setSystemRequirements();
-    
+
     // set locks for the solver
     setLocks();
 
@@ -740,7 +740,7 @@ SATResolver::resolveQueue(const SolverQueueItemList &requestQueue,
     // cleanup
     if (ret)
        solverEnd(); // remove solver only if no errors happend. Need it for solving problems
-    
+
     MIL << "SATResolver::resolveQueue() done. Ret:" << ret <<  endl;
     return ret;
 }
@@ -755,7 +755,7 @@ void SATResolver::doUpdate()
 
     // set requirements for a running system
     setSystemRequirements();
-    
+
     // set locks for the solver
     void setLocks();
 
@@ -764,12 +764,12 @@ void SATResolver::doUpdate()
 
     _solv->updatesystem = true;
     _solv->dontinstallrecommended = true; // #FIXME dontinstallrecommended maybe set to false if it works correctly
-    
+
     sat::Pool::instance().prepare();
 
     // Solve !
     MIL << "Starting solving for update...." << endl;
-    MIL << *this;    
+    MIL << *this;
     solver_solve( _solv, &(_jobQueue) );
     MIL << "....Solver end" << endl;
 
@@ -846,7 +846,7 @@ struct FindPackage : public resfilter::ResObjectFilterFunctor
        , action (act)
        {
        }
+
     bool operator()( PoolItem p)
    {
        problemSolution->addSingleAction (p, action);
@@ -880,7 +880,7 @@ PoolItem SATResolver::mapItem (const PoolItem &item)
 sat::Solvable SATResolver::mapSolvable (const Id &id)
 {
     PoolItem item = _pool.find (sat::Solvable(id));
-    return mapItem(item).satSolvable();    
+    return mapItem(item).satSolvable();
 }
 
 string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreId)
@@ -907,7 +907,7 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
          break;
       case SOLVER_PROBLEM_JOB_NOTHING_PROVIDES_DEP:
          ret = str::form (_("nothing provides requested %s"), dep2str(pool, dep));
-         detail += _("Have you enabled all requested repositories?");    
+         detail += _("Have you enabled all requested repositories?");
          break;
       case SOLVER_PROBLEM_NOT_INSTALLABLE:
          s = mapSolvable (source);
@@ -935,7 +935,7 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
       case SOLVER_PROBLEM_SELF_CONFLICT:
          s = mapSolvable (source);
          ret = str::form (_("Solvable %s conflicts with %s provided by itself"), solvable2str(pool, s.get()), dep2str(pool, dep));
-          break;         
+          break;
       case SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE:
          ignoreId = source; // for setting weak dependencies
          s = mapSolvable (source);
@@ -950,7 +950,7 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
              // find pair of an installed/uninstalled item with the same NVR
              bool found = false;
              for_( iter2, possibleProviders.begin(), possibleProviders.end() ) {
-                 PoolItem provider2 = ResPool::instance().find( *iter2 );                
+                 PoolItem provider2 = ResPool::instance().find( *iter2 );
                  if (compareByNVR (provider1.resolvable(),provider2.resolvable()) == 0
                      && ( (provider1.status().isInstalled() && provider2.status().isUninstalled())
                          || (provider2.status().isInstalled() && provider1.status().isUninstalled()) ))  {
@@ -980,14 +980,14 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
              if (detail.size() > 0)
                  detail += _("\nuninstallable providers: ");
              else
-                 detail = _("uninstallable providers: ");                
+                 detail = _("uninstallable providers: ");
              for (ProviderList::const_iterator iter = providerlistUninstalled.begin(); iter != providerlistUninstalled.end(); iter++) {
                  if (iter == providerlistUninstalled.begin())
-                     detail += itemToString (*iter, false);                  
+                     detail += itemToString (*iter, false);
                  else
-                     detail += "\n                   " + itemToString (mapItem(*iter), false);               
+                     detail += "\n                   " + itemToString (mapItem(*iter), false);
              }
-         }       
+         }
          break;
   }
 
@@ -1078,8 +1078,8 @@ SATResolver::problems ()
                                IdString ident( what );
                                SolverQueueItemInstall_Ptr install =
                                    new SolverQueueItemInstall(_pool, ident.asString(), false );
-                               problemSolution->addSingleAction (install, REMOVE_SOLVE_QUEUE_ITEM);                            
-                               
+                               problemSolution->addSingleAction (install, REMOVE_SOLVE_QUEUE_ITEM);
+
                                string description = str::form (_("do not install %s"), ident.c_str() );
                                MIL << description << endl;
                                problemSolution->addDescription (description);
@@ -1088,7 +1088,7 @@ SATResolver::problems ()
                            case SOLVER_ERASE_SOLVABLE_NAME:
                                {
                                // As we do not know, if this request has come from resolvePool or
-                               // resolveQueue we will have to take care for both cases.                                   
+                               // resolveQueue we will have to take care for both cases.
                                 IdString ident( what );
                                FindPackage info (problemSolution, KEEP);
                                invokeOnEach( _pool.byIdentBegin( ident ),
@@ -1096,11 +1096,11 @@ SATResolver::problems ()
                                              functor::chain (resfilter::ByInstalled (),                        // ByInstalled
                                                              resfilter::ByTransact ()),                        // will be deinstalled
                                              functor::functorRef<bool,PoolItem> (info) );
-                               
+
                                SolverQueueItemDelete_Ptr del =
                                    new SolverQueueItemDelete(_pool, ident.asString(), false );
-                               problemSolution->addSingleAction (del, REMOVE_SOLVE_QUEUE_ITEM);                                
-                               
+                               problemSolution->addSingleAction (del, REMOVE_SOLVE_QUEUE_ITEM);
+
                                string description = str::form (_("keep %s"), ident.c_str());
                                MIL << description << endl;
                                problemSolution->addDescription (description);
@@ -1121,7 +1121,7 @@ SATResolver::problems ()
                                    description = str::form (_("do not ask to install a solvable providing %s"), dep2str(pool, what));
                                }
                                MIL << description << endl;
-                               problemSolution->addDescription (description);                          
+                               problemSolution->addDescription (description);
                                }
                                break;
                            case SOLVER_ERASE_SOLVABLE_PROVIDES:
@@ -1139,7 +1139,7 @@ SATResolver::problems ()
                                    description = str::form (_("do not ask to delete all solvables providing %s"), dep2str(pool, what));
                                }
                                MIL << description << endl;
-                               problemSolution->addDescription (description);                          
+                               problemSolution->addDescription (description);
                                }
                                break;
                            case SOLVER_INSTALL_SOLVABLE_UPDATE:
@@ -1234,14 +1234,14 @@ SATResolver::problems ()
 
            if (ignoreId > 0) {
                // There is a possibility to ignore this error by setting weak dependencies
-               PoolItem item = _pool.find (sat::Solvable(ignoreId));           
-               ProblemSolutionIgnore *problemSolution = new ProblemSolutionIgnore(resolverProblem, item);              
+               PoolItem item = _pool.find (sat::Solvable(ignoreId));
+               ProblemSolutionIgnore *problemSolution = new ProblemSolutionIgnore(resolverProblem, item);
                resolverProblem->addSolution (problemSolution,
                                              false); // Solutions will be shown at the end
                MIL << "Ignore some dependencies of " << item << endl;
-               MIL << "------------------------------------" << endl;          
-           }       
-           
+               MIL << "------------------------------------" << endl;
+           }
+
            // save problem
            resolverProblems.push_back (resolverProblem);
        }
@@ -1287,14 +1287,14 @@ void SATResolver::setLocks()
            queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE | SOLVER_WEAK);
            queue_push( &(_jobQueue), ident );
        }
-    }    
+    }
 }
 
 void SATResolver::setSystemRequirements()
 {
     CapabilitySet system_requires = SystemCheck::instance().requiredSystemCap();
     CapabilitySet system_conflicts = SystemCheck::instance().conflictSystemCap();
-    
+
     for (CapabilitySet::const_iterator iter = system_requires.begin(); iter != system_requires.end(); iter++) {
        queue_push( &(_jobQueue), SOLVER_INSTALL_SOLVABLE_PROVIDES );
        queue_push( &(_jobQueue), iter->id() );
@@ -1307,7 +1307,7 @@ void SATResolver::setSystemRequirements()
        MIL << "SYSTEM Conflicts " << *iter << endl;
     }
 }
-    
+
 
 ///////////////////////////////////////////////////////////////////
 };// namespace detail