Author: mlandres
Date: Tue Jan 29 19:08:25 2008
New Revision: 8392
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8392&view=rev
Log:
- Prepare ResPool being a singleton ontop of sat::Pool.
Remove obsolete ZYpp::{add,remove}Resolvables methods .
Removed:
branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolManager.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolManager.h
branches/tmp/ma/jump_sat/libzypp/zypp/SilentCallbacks.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ChangeLog
Modified:
branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc
branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc
branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.h
branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h
branches/tmp/ma/jump_sat/libzypp/zypp/Target.h
branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.h
branches/tmp/ma/jump_sat/libzypp/zypp/ZYppCommitResult.h
branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc
branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.h
branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Types.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/ui/Selectable.h
branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.h
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt Tue Jan 29 19:08:25 2008
@@ -33,7 +33,6 @@
ResPool.cc
NameKindProxy.cc
ResPoolProxy.cc
- ResPoolManager.cc
Resolver.cc
ResolverProblem.cc
ProblemSolution.cc
@@ -145,7 +144,6 @@
ResObject.h
ResObjectsh
ResPool.h
- ResPoolManager.h
ResPoolProxy.h
ResStatus.h
ResStore.h
@@ -156,7 +154,6 @@
Script.h
Selection.h
Signature.h
- SilentCallbacks.h
SrcPackage.h
SysContent.h
Target.h
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc Tue Jan 29 19:08:25 2008
@@ -103,7 +103,7 @@
bool operator()( const CapAndItem &cai_r )
{
- PoolItem_Ref item(cai_r.item);
+ PoolItem item(cai_r.item);
MIL << "Locking " << cai_r.item << "(matched by " << _lock_str << ")" << endl;
item.status().setLock( true, ResStatus::USER);
return true;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc Tue Jan 29 19:08:25 2008
@@ -24,10 +24,10 @@
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : PoolItem_Ref::Impl
+ // CLASS NAME : PoolItem::Impl
//
- /** PoolItem_Ref implementation. */
- struct PoolItem_Ref::Impl
+ /** PoolItem implementation. */
+ struct PoolItem::Impl
{
Impl()
{}
@@ -94,8 +94,8 @@
};
///////////////////////////////////////////////////////////////////
- /** \relates PoolItem_Ref::Impl Stream output */
- inline std::ostream & operator<<( std::ostream & str, const PoolItem_Ref::Impl & obj )
+ /** \relates PoolItem::Impl Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const PoolItem::Impl & obj )
{
str << obj.status();
if (obj.resolvable())
@@ -105,7 +105,7 @@
return str;
}
- inline bool PoolItem_Ref::Impl::autoprotect() const
+ inline bool PoolItem::Impl::autoprotect() const
{
if ( _status.isInstalled()
&& isKind<Package>( _resolvable )
@@ -120,43 +120,43 @@
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : PoolItem_Ref
+ // CLASS NAME : PoolItem
//
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : PoolItem_Ref::PoolItem_Ref
+ // METHOD NAME : PoolItem::PoolItem
// METHOD TYPE : Ctor
//
- PoolItem_Ref::PoolItem_Ref()
+ PoolItem::PoolItem()
: _pimpl( Impl::nullimpl() )
{}
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : PoolItem_Ref::PoolItem_Ref
+ // METHOD NAME : PoolItem::PoolItem
// METHOD TYPE : Ctor
//
- PoolItem_Ref::PoolItem_Ref( ResObject::constPtr res_r )
+ PoolItem::PoolItem( ResObject::constPtr res_r )
: _pimpl( new Impl( res_r ) )
{}
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : PoolItem_Ref::PoolItem_Ref
+ // METHOD NAME : PoolItem::PoolItem
// METHOD TYPE : Ctor
//
- PoolItem_Ref::PoolItem_Ref( ResObject::constPtr res_r, const ResStatus & status_r )
+ PoolItem::PoolItem( ResObject::constPtr res_r, const ResStatus & status_r )
: _pimpl( new Impl( res_r, status_r ) )
{}
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : PoolItem_Ref::~PoolItem_Ref
+ // METHOD NAME : PoolItem::~PoolItem
// METHOD TYPE : Dtor
//
- PoolItem_Ref::~PoolItem_Ref()
+ PoolItem::~PoolItem()
{}
///////////////////////////////////////////////////////////////////
@@ -165,22 +165,22 @@
//
///////////////////////////////////////////////////////////////////
- ResStatus & PoolItem_Ref::status() const
+ ResStatus & PoolItem::status() const
{ return _pimpl->status(); }
- ResStatus & PoolItem_Ref::statusReset() const
+ ResStatus & PoolItem::statusReset() const
{ return _pimpl->statusReset(); }
- ResObject::constPtr PoolItem_Ref::resolvable() const
+ ResObject::constPtr PoolItem::resolvable() const
{ return _pimpl->resolvable(); }
- void PoolItem_Ref::saveState() const
+ void PoolItem::saveState() const
{ _pimpl->saveState(); }
- void PoolItem_Ref::restoreState() const
+ void PoolItem::restoreState() const
{ _pimpl->restoreState(); }
- bool PoolItem_Ref::sameState() const
+ bool PoolItem::sameState() const
{ return _pimpl->sameState(); }
/******************************************************************
@@ -188,7 +188,7 @@
** FUNCTION NAME : operator<<
** FUNCTION TYPE : std::ostream &
*/
- std::ostream & operator<<( std::ostream & str, const PoolItem_Ref & obj )
+ std::ostream & operator<<( std::ostream & str, const PoolItem & obj )
{
return str << *obj._pimpl;
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.h Tue Jan 29 19:08:25 2008
@@ -25,42 +25,42 @@
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : PoolItem_Ref
+ // CLASS NAME : PoolItem
//
/** Reference to a PoolItem connecting ResObject and ResStatus.
*
* The "real" PoolItem is usg. somewhere in the ResPool. This is
* a reference to it. All copies made will reference (and modify)
- * the same PoolItem. All changes via a PoolItem_Ref are immediately
+ * the same PoolItem. All changes via a PoolItem are immediately
* visible in all copies (now COW).
*
- * \note Constness: Like pointer types, a <tt>const PoolItem_Ref</tt>
+ * \note Constness: Like pointer types, a <tt>const PoolItem</tt>
* does \b not refer to a <tt>const PoolItem</tt>. The reference is
* \c const, i.e. you can't change the refered PoolItem. The PoolItem
* (i.e. the status) is always mutable.
*
*/
- class PoolItem_Ref
+ class PoolItem
{
- friend std::ostream & operator<<( std::ostream & str, const PoolItem_Ref & obj );
+ friend std::ostream & operator<<( std::ostream & str, const PoolItem & obj );
public:
- /** Implementation */
+ /** Implementation */
class Impl;
public:
/** Default ctor for use in std::container. */
- PoolItem_Ref();
+ PoolItem();
/** Ctor */
explicit
- PoolItem_Ref( ResObject::constPtr res_r );
+ PoolItem( ResObject::constPtr res_r );
/** Ctor */
- PoolItem_Ref( ResObject::constPtr res_r, const ResStatus & status_r );
+ PoolItem( ResObject::constPtr res_r, const ResStatus & status_r );
/** Dtor */
- ~PoolItem_Ref();
+ ~PoolItem();
public:
/** Returns the current status. */
@@ -106,34 +106,35 @@
};
///////////////////////////////////////////////////////////////////
- typedef PoolItem_Ref PoolItem;
+ /** \relates PoolItem \todo remove deprecated typedef. */
+ typedef PoolItem ZYPP_DEPRECATED PoolItem_Ref;
- /** \relates PoolItem_Ref Stream output */
- std::ostream & operator<<( std::ostream & str, const PoolItem_Ref & obj );
+ /** \relates PoolItem Stream output */
+ std::ostream & operator<<( std::ostream & str, const PoolItem & obj );
- /** \relates PoolItem_Ref */
- inline bool operator==( const PoolItem_Ref & lhs, const PoolItem_Ref & rhs )
+ /** \relates PoolItem */
+ inline bool operator==( const PoolItem & lhs, const PoolItem & rhs )
{ return lhs.resolvable() == rhs.resolvable(); }
- /** \relates PoolItem_Ref */
- inline bool operator==( const PoolItem_Ref & lhs, const ResObject::constPtr & rhs )
+ /** \relates PoolItem */
+ inline bool operator==( const PoolItem & lhs, const ResObject::constPtr & rhs )
{ return lhs.resolvable() == rhs; }
- /** \relates PoolItem_Ref */
- inline bool operator==( const ResObject::constPtr & lhs, const PoolItem_Ref & rhs )
+ /** \relates PoolItem */
+ inline bool operator==( const ResObject::constPtr & lhs, const PoolItem & rhs )
{ return lhs == rhs.resolvable(); }
- /** \relates PoolItem_Ref */
- inline bool operator!=( const PoolItem_Ref & lhs, const PoolItem_Ref & rhs )
+ /** \relates PoolItem */
+ inline bool operator!=( const PoolItem & lhs, const PoolItem & rhs )
{ return ! (lhs==rhs); }
- /** \relates PoolItem_Ref */
- inline bool operator!=( const PoolItem_Ref & lhs, const ResObject::constPtr & rhs )
+ /** \relates PoolItem */
+ inline bool operator!=( const PoolItem & lhs, const ResObject::constPtr & rhs )
{ return ! (lhs==rhs); }
- /** \relates PoolItem_Ref */
- inline bool operator!=( const ResObject::constPtr & lhs, const PoolItem_Ref & rhs )
+ /** \relates PoolItem */
+ inline bool operator!=( const ResObject::constPtr & lhs, const PoolItem & rhs )
{ return ! (lhs==rhs); }
/////////////////////////////////////////////////////////////////
@@ -143,9 +144,9 @@
namespace std
{ /////////////////////////////////////////////////////////////////
- /** \relates zypp::PoolItem_Ref Order in std::container follows ResObject::constPtr.*/
+ /** \relates zypp::PoolItem Order in std::container follows ResObject::constPtr.*/
template<>
- inline bool lesszypp::PoolItem_Ref::operator()( const zypp::PoolItem_Ref & lhs, const zypp::PoolItem_Ref & rhs ) const
+ inline bool lesszypp::PoolItem::operator()( const zypp::PoolItem & lhs, const zypp::PoolItem & rhs ) const
{ return lhs.resolvable() < rhs.resolvable(); }
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc Tue Jan 29 19:08:25 2008
@@ -12,9 +12,10 @@
#include <iostream>
//#include "zypp/base/Logger.h"
+#include "zypp/base/SerialNumber.h"
+
#include "zypp/ResPool.h"
#include "zypp/pool/PoolImpl.h"
-#include "zypp/base/SerialNumber.h"
using std::endl;
@@ -52,18 +53,13 @@
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : ResPool::~ResPool
- // METHOD TYPE : Dtor
- //
- ResPool::~ResPool()
- {}
-
- ///////////////////////////////////////////////////////////////////
- //
// Forward to impementation:
//
///////////////////////////////////////////////////////////////////
+ ResPoolProxy ResPool::proxy() const
+ { return _pimpl->proxy( *this ); }
+
bool ResPool::empty() const
{ return _pimpl->empty(); }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h Tue Jan 29 19:08:25 2008
@@ -15,29 +15,25 @@
#include <iosfwd>
#include "zypp/base/Deprecated.h"
+#include "zypp/base/Iterator.h"
#include "zypp/pool/PoolTraits.h"
-#include "zypp/base/Iterator.h"
#include "zypp/ResFilters.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace sat
- { /////////////////////////////////////////////////////////////////
- class Solvable;
- /////////////////////////////////////////////////////////////////
- } // namespace sat
- ///////////////////////////////////////////////////////////////////
class SerialNumber;
+ class ResPoolProxy;
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : ResPool
//
- /** Access to ResObject pool.
+ /** Global ResObject pool.
+ *
+ * Explicitly shared singleton.
*
* \note Filter iterators provided by ResPool are intended to
* operate on internal index tables for faster access. If the
@@ -56,17 +52,16 @@
typedef pool::PoolTraits::const_iterator const_iterator;
typedef pool::PoolTraits::byName_iterator byName_iterator;
typedef pool::PoolTraits::byCapabilityIndex_iterator byCapabilityIndex_iterator;
- typedef pool::PoolTraits::AdditionalCapabilities AdditionalCapabilities;
+ typedef pool::PoolTraits::AdditionalCapabilities AdditionalCapabilities;
typedef pool::PoolTraits::repository_iterator repository_iterator;
public:
/** Singleton ctor. */
- //static ResPool instance();
+ static ResPool instance()
+ { return ResPool(); }
- /** Default ctor: empty pool */
- ResPool();
- /** Dtor */
- ~ResPool();
+ /** preliminary */
+ ResPoolProxy proxy() const;
public:
/** The pools serial number. Changing whenever the
@@ -211,17 +206,17 @@
AdditionalCapabilities & additionaProvide() const;
private:
- /** */
- friend class ResPoolManager;
/** Ctor */
ResPool( pool::PoolTraits::Impl_constPtr impl_r );
+ /** Default ctor */
+ ResPool();
private:
/** Const access to implementation. */
pool::PoolTraits::Impl_constPtr _pimpl;
};
///////////////////////////////////////////////////////////////////
- /** \todo rename class and eliminate typedef. */
+ /** \relates ResPool \todo remove deprecated typedef. */
typedef ResPool ZYPP_DEPRECATED ResPool_Ref;
///////////////////////////////////////////////////////////////////
@@ -232,4 +227,7 @@
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
+
+#include "zypp/ResPoolProxy.h"
+
#endif // ZYPP_RESPOOL_H
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.cc Tue Jan 29 19:08:25 2008
@@ -28,38 +28,38 @@
/** Tem. friend of PoolItem */
struct PoolItemSaver
{
- void saveState( ResPool_Ref pool_r )
+ void saveState( ResPool pool_r )
{
std::for_each( pool_r.begin(), pool_r.end(),
std::mem_fun_ref(&PoolItem::saveState) );
}
- void saveState( ResPool_Ref pool_r, const ResObject::Kind & kind_r )
+ void saveState( ResPool pool_r, const ResObject::Kind & kind_r )
{
std::for_each( pool_r.byKindBegin(kind_r), pool_r.byKindEnd(kind_r),
std::mem_fun_ref(&PoolItem::saveState) );
}
- void restoreState( ResPool_Ref pool_r )
+ void restoreState( ResPool pool_r )
{
std::for_each( pool_r.begin(), pool_r.end(),
std::mem_fun_ref(&PoolItem::restoreState) );
}
- void restoreState( ResPool_Ref pool_r, const ResObject::Kind & kind_r )
+ void restoreState( ResPool pool_r, const ResObject::Kind & kind_r )
{
std::for_each( pool_r.byKindBegin(kind_r), pool_r.byKindEnd(kind_r),
std::mem_fun_ref(&PoolItem::restoreState) );
}
- bool diffState( ResPool_Ref pool_r ) const
+ bool diffState( ResPool pool_r ) const
{
// return whether some PoolItem::sameState reported \c false.
return( invokeOnEach( pool_r.begin(), pool_r.end(),
std::mem_fun_ref(&PoolItem::sameState) ) < 0 );
}
- bool diffState( ResPool_Ref pool_r, const ResObject::Kind & kind_r ) const
+ bool diffState( ResPool pool_r, const ResObject::Kind & kind_r ) const
{
// return whether some PoolItem::sameState reported \c false.
return( invokeOnEach( pool_r.byKindBegin(kind_r), pool_r.byKindEnd(kind_r),
@@ -150,12 +150,12 @@
{
public:
Impl()
+ :_pool( ResPool::instance() )
{}
- Impl( ResPool_Ref pool_r )
+ Impl( ResPool pool_r )
: _pool( pool_r )
{
-
SelPoolHelper collect;
std::for_each( _pool.begin(), _pool.end(),
functor::functorRef( collect ) );
@@ -207,7 +207,7 @@
{ return PoolItemSaver().diffState( _pool, kind_r ); }
private:
- ResPool_Ref _pool;
+ ResPool _pool;
mutable SelectablePool _selPool;
public:
@@ -246,7 +246,7 @@
// METHOD NAME : ResPoolProxy::ResPoolProxy
// METHOD TYPE : Ctor
//
- ResPoolProxy::ResPoolProxy( ResPool_Ref pool_r )
+ ResPoolProxy::ResPoolProxy( ResPool pool_r )
: _pimpl( new Impl( pool_r ) )
{}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResPoolProxy.h Tue Jan 29 19:08:25 2008
@@ -29,7 +29,7 @@
// CLASS NAME : ResPoolProxy
//
/**
- * \todo Make it a _Ref.
+ * \todo integrate it into ResPool
*/
class ResPoolProxy
{
@@ -52,7 +52,7 @@
/** Default ctor: no pool */
ResPoolProxy();
/** Ctor */
- ResPoolProxy( ResPool_Ref pool_r );
+ ResPoolProxy( ResPool pool_r ) ZYPP_DEPRECATED;
/** Dtor */
~ResPoolProxy();
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc Tue Jan 29 19:08:25 2008
@@ -85,7 +85,7 @@
{ return _pimpl->extraRequires();}
const CapabilitySet Resolver::getConflict ()
{ return _pimpl->extraConflicts();}
- std::list Resolver::problematicUpdateItems( void ) const
+ std::list<PoolItem> Resolver::problematicUpdateItems( void ) const
{ return _pimpl->problematicUpdateItems(); }
bool Resolver::createSolverTestcase (const std::string & dumpPath)
{ solver::detail::Testcase testcase (dumpPath);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h Tue Jan 29 19:08:25 2008
@@ -96,7 +96,7 @@
* Return the list of problematic update items
* i.e. locked ones (due to foreign vendor)
**/
- std::list problematicUpdateItems( void ) const;
+ std::list<PoolItem> problematicUpdateItems( void ) const;
/**
* Return the dependency problems found by the last call to
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Target.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Target.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Target.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Target.h Tue Jan 29 19:08:25 2008
@@ -51,7 +51,7 @@
public:
typedef target::TargetImpl Impl;
typedef intrusive_ptr<Impl> Impl_Ptr;
- typedef std::list PoolItemList;
+ typedef std::list<PoolItem> PoolItemList;
public:
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.cc Tue Jan 29 19:08:25 2008
@@ -10,7 +10,7 @@
*
*/
#include <iostream>
-//#include "zypp/base/Logger.h"
+#include "zypp/base/Logger.h"
#include "zypp/ZYpp.h"
#include "zypp/zypp_detail/ZYppImpl.h"
@@ -81,24 +81,9 @@
//
///////////////////////////////////////////////////////////////////
- void ZYpp::addResolvables (const ResStore& store, bool installed)
- {
- _pimpl->addResolvables (store, installed);
- }
-
- void ZYpp::removeResolvables (const ResStore& store)
- {
- _pimpl->removeResolvables (store);
- }
-
- ///////////////////////////////////////////////////////////////////
-
Target_Ptr ZYpp::target() const
{ return _pimpl->target(); }
- void ZYpp::initTarget(const Pathname & root, bool commit_only )
- { _pimpl->initTarget(root, commit_only); }
-
void ZYpp::initializeTarget(const Pathname & root)
{ _pimpl->initializeTarget(root); }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ZYpp.h Tue Jan 29 19:08:25 2008
@@ -61,8 +61,8 @@
public:
/**
- * Access to the main resolvable pool
- * \ref zypp::ResPool
+ * Access to the global resolvable pool.
+ * Same as \ref zypp::ResPool::instance
*/
ResPool pool() const;
@@ -72,10 +72,6 @@
*/
ResPoolProxy poolProxy() const;
- void addResolvables (const ResStore& store, bool installed = false);
-
- void removeResolvables (const ResStore& store);
-
DiskUsageCounter::MountPointSet diskUsage();
void setPartitions(const DiskUsageCounter::MountPointSet &mp);
@@ -96,12 +92,6 @@
/**
* \throws Exception
- * if commit_only == true, just init the target, dont populate store or pool
- */
- ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only = false);
-
- /**
- * \throws Exception
*/
void finishTarget();
@@ -175,15 +165,15 @@
void setArchitecture( const Arch & arch );
public:
-
- /**
+
+ /**
* \short Apply persistant locks to current pool.
* Call this before solving
*
* \returns Number of items locked
*/
int applyLocks();
-
+
protected:
/** Dtor */
virtual ~ZYpp();
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ZYppCommitResult.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ZYppCommitResult.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ZYppCommitResult.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ZYppCommitResult.h Tue Jan 29 19:08:25 2008
@@ -35,7 +35,7 @@
: _result(0)
{}
- typedef std::list PoolItemList;
+ typedef std::list<PoolItem> PoolItemList;
/**
* number of committed resolvables
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc Tue Jan 29 19:08:25 2008
@@ -54,7 +54,7 @@
for ( GetResolvablesToInsDel::PoolItemList::const_iterator it = instlist_r.begin();
it != instlist_r.end(); ++it )
{
- PoolItem_Ref item( *it );
+ PoolItem item( *it );
obsoletes.insert( item->dep(Dep::OBSOLETES).begin(), item->dep(Dep::OBSOLETES).end() );
}
if ( obsoletes.size() == 0 )
@@ -66,7 +66,7 @@
for ( GetResolvablesToInsDel::PoolItemList::iterator it = deleteList_r.begin();
it != deleteList_r.end(); ++it )
{
- PoolItem_Ref ipkg( *it );
+ PoolItem ipkg( *it );
bool delayPkg = false;
// ...check whether an obsoletes....
for ( std::set<Capability>::iterator obs = obsoletes.begin();
@@ -102,7 +102,7 @@
//
GetResolvablesToInsDel::GetResolvablesToInsDel( ResPool pool_r, Order order_r )
{
- typedef std::set PoolItemSet;
+ typedef std::set<PoolItem> PoolItemSet;
PoolItemList & dellist_r( _toDelete );
PoolItemList & instlist_r( _toInstall );
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.h Tue Jan 29 19:08:25 2008
@@ -36,7 +36,7 @@
*/
struct GetResolvablesToInsDel
{
- typedef std::list PoolItemList;
+ typedef std::list<PoolItem> PoolItemList;
/** Influences the sequence of sources and media proscessed.
* If true prefer a better source, otherwise a better media.
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h Tue Jan 29 19:08:25 2008
@@ -16,9 +16,6 @@
#include <map>
#include "zypp/PoolItem.h"
-#include "zypp/Capability.h"
-#include "zypp/Dep.h"
-#include "zypp/ResStatus.h"
///////////////////////////////////////////////////////////////////
namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.cc Tue Jan 29 19:08:25 2008
@@ -55,7 +55,7 @@
bool Pool::reposEmpty() const
{ return myPool()->nrepos; }
- unsigned Pool::reposSize() const
+ Pool::size_type Pool::reposSize() const
{ return myPool()->nrepos; }
Pool::RepoIterator Pool::reposBegin() const
@@ -77,12 +77,12 @@
return true;
}
- unsigned Pool::solvablesSize() const
+ Pool::size_type Pool::solvablesSize() const
{
- // return myPool()->nsolvables;
+ // Do not return myPool()->nsolvables;
// nsolvables is the array size including
// invalid Solvables.
- unsigned ret = 0;
+ size_type ret = 0;
for_( it, reposBegin(), reposEnd() )
{
ret += it->solvablesSize();
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Pool.h Tue Jan 29 19:08:25 2008
@@ -42,6 +42,7 @@
public:
typedef detail::SolvableIterator SolvableIterator;
typedef detail::RepoIterator RepoIterator;
+ typedef detail::size_type size_type;
public:
/** Singleton ctor. */
@@ -67,7 +68,7 @@
bool reposEmpty() const;
/** Number of repos in \ref Pool. */
- unsigned reposSize() const;
+ size_type reposSize() const;
/** Iterator to the first \ref Repo. */
RepoIterator reposBegin() const;
@@ -115,7 +116,7 @@
bool solvablesEmpty() const;
/** Number of solvables in \ref Pool. */
- unsigned solvablesSize() const;
+ size_type solvablesSize() const;
/** Iterator to the first \ref Solvable. */
SolvableIterator solvablesBegin() const;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.cc Tue Jan 29 19:08:25 2008
@@ -65,7 +65,7 @@
return _repo->nsolvables;
}
- unsigned Repo::solvablesSize() const
+ Repo::size_type Repo::solvablesSize() const
{
NO_REPO_RETURN( 0 );
return _repo->nsolvables;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Repo.h Tue Jan 29 19:08:25 2008
@@ -39,6 +39,7 @@
{
public:
typedef filter_iterator SolvableIterator;
+ typedef detail::size_type size_type;
public:
/** Default ctor creates \ref norepo.*/
@@ -67,7 +68,7 @@
bool solvablesEmpty() const;
/** Number of solvables in \ref Repo. */
- unsigned solvablesSize() const;
+ size_type solvablesSize() const;
/** Iterator to the first \ref Solvable. */
SolvableIterator solvablesBegin() const;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc Tue Jan 29 19:08:25 2008
@@ -102,7 +102,7 @@
void
-SATResolver::addPoolItemToInstall (PoolItem_Ref item)
+SATResolver::addPoolItemToInstall (PoolItem item)
{
bool found = false;
for (PoolItemList::const_iterator iter = _items_to_remove.begin();
@@ -130,7 +130,7 @@
void
-SATResolver::addPoolItemToRemove (PoolItem_Ref item)
+SATResolver::addPoolItemToRemove (PoolItem item)
{
bool found = false;
for (PoolItemList::const_iterator iter = _items_to_install.begin();
@@ -157,7 +157,7 @@
}
void
-SATResolver::addPoolItemToLock (PoolItem_Ref item)
+SATResolver::addPoolItemToLock (PoolItem item)
{
_items_to_lock.push_back (item);
_items_to_lock.unique ();
@@ -170,7 +170,7 @@
// if data != NULL, set as APPL_LOW (from establishPool())
static void
-SATSolutionToPool (PoolItem_Ref item, const ResStatus & status, const ResStatus::TransactByValue causer)
+SATSolutionToPool (PoolItem item, const ResStatus & status, const ResStatus::TransactByValue causer)
{
#if 0
if (triggeredSolution.find(item) != triggeredSolution.end()) {
@@ -287,7 +287,7 @@
: resolver (r)
{ }
- bool operator()( PoolItem_Ref item ) // only transacts() items go here
+ bool operator()( PoolItem item ) // only transacts() items go here
{
ResStatus status = item.status();
_XDEBUG( "SATCollectTransact(" << item << ")" );
@@ -306,7 +306,7 @@
resolver.addPoolItemToRemove(item); // -> remove !
}
if (status.isIncomplete()) { // incomplete (re-install needed)
- PoolItem_Ref reinstall = Helper::findReinstallItem (resolver.pool(), item);
+ PoolItem reinstall = Helper::findReinstallItem (resolver.pool(), item);
if (reinstall) {
MIL << "Reinstall " << reinstall << " for incomplete " << item << endl;
resolver.addPoolItemToInstall(reinstall); // -> install!
@@ -346,7 +346,7 @@
// check this item will be installed
- bool operator()( PoolItem_Ref item )
+ bool operator()( PoolItem item )
{
if (item.status().isToBeInstalled())
{
@@ -390,7 +390,7 @@
functor::functorRef(info) );
for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
- PoolItem_Ref r = *iter;
+ PoolItem r = *iter;
Id id = (*iter)->satSolvable().id();
if (id == ID_NULL) {
@@ -461,7 +461,7 @@
if (sat::Solvable(p).repo().get() == _solv->installed)
continue;
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(p));
+ PoolItem poolItem = _pool.find (sat::Solvable(p));
if (poolItem) {
SATSolutionToPool (poolItem, ResStatus::toBeInstalled, ResStatus::SOLVER);
} else {
@@ -475,7 +475,7 @@
if (_solv->decisionmap[i] > 0)
continue;
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(i));
+ PoolItem poolItem = _pool.find (sat::Solvable(i));
if (poolItem) {
// Check if this is an update
CheckIfUpdate info;
@@ -524,7 +524,7 @@
{
}
- bool operator()( PoolItem_Ref p)
+ bool operator()( PoolItem p)
{
problemSolution->addSingleAction (p, action);
return true;
@@ -618,7 +618,7 @@
{
case SOLVER_INSTALL_SOLVABLE: {
s = pool->solvables + what;
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(what));
+ PoolItem poolItem = _pool.find (sat::Solvable(what));
if (poolItem) {
if (_solv->installed && s->repo == _solv->installed) {
problemSolution->addSingleAction (poolItem, REMOVE);
@@ -639,7 +639,7 @@
break;
case SOLVER_ERASE_SOLVABLE: {
s = pool->solvables + what;
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(what));
+ PoolItem poolItem = _pool.find (sat::Solvable(what));
if (poolItem) {
if (_solv->installed && s->repo == _solv->installed) {
problemSolution->addSingleAction (poolItem, KEEP);
@@ -690,7 +690,7 @@
Id p, *pp;
FOR_PROVIDES(p, pp, what);
{
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(p));
+ PoolItem poolItem = _pool.find (sat::Solvable(p));
if (poolItem.status().isToBeInstalled()
|| poolItem.status().staysUninstalled())
problemSolution->addSingleAction (poolItem, KEEP);
@@ -705,7 +705,7 @@
Id p, *pp;
FOR_PROVIDES(p, pp, what);
{
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(p));
+ PoolItem poolItem = _pool.find (sat::Solvable(p));
if (poolItem.status().isToBeUninstalled()
|| poolItem.status().staysInstalled())
problemSolution->addSingleAction (poolItem, KEEP);
@@ -717,7 +717,7 @@
break;
case SOLVER_INSTALL_SOLVABLE_UPDATE:
{
- PoolItem_Ref poolItem = _pool.find (sat::Solvable(what));
+ PoolItem poolItem = _pool.find (sat::Solvable(what));
s = pool->solvables + what;
if (poolItem) {
if (_solv->installed && s->repo == _solv->installed) {
@@ -744,12 +744,12 @@
s = pool->solvables + p;
sd = rp ? pool->solvables + rp : 0;
- PoolItem_Ref itemFrom = _pool.find (sat::Solvable(p));
+ PoolItem itemFrom = _pool.find (sat::Solvable(p));
if (rp)
{
int gotone = 0;
- PoolItem_Ref itemTo = _pool.find (sat::Solvable(rp));
+ PoolItem itemTo = _pool.find (sat::Solvable(rp));
if (itemFrom && itemTo) {
problemSolution->addSingleAction (itemTo, INSTALL);
problemSolution->addSingleAction (itemFrom, REMOVE);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.h Tue Jan 29 19:08:25 2008
@@ -102,12 +102,12 @@
ResolverProblemList problems ();
void applySolutions (const ProblemSolutionList &solutions);
- void addPoolItemToInstall (PoolItem_Ref item);
+ void addPoolItemToInstall (PoolItem item);
void addPoolItemsToInstallFromList (PoolItemList & rl);
- void addPoolItemToLock (PoolItem_Ref item);
+ void addPoolItemToLock (PoolItem item);
- void addPoolItemToRemove (PoolItem_Ref item);
+ void addPoolItemToRemove (PoolItem item);
void addPoolItemsToRemoveFromList (PoolItemList & rl);
bool fixsystem () const {return _fixsystem;}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h Tue Jan 29 19:08:25 2008
@@ -81,12 +81,12 @@
inline bool isDepMarkerId( IdType id_r )
{ return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
-
/** Id type to connect \ref Solvable and sat-solvable.
* Indext into solvable array.
*/
typedef unsigned SolvableIdType;
- /** Id to denote \ref Solvable::nosolvable. */
+ typedef SolvableIdType size_type;
+ /** Id to denote \ref Solvable::nosolvable. */
static const SolvableIdType noSolvableId( 0 );
/** Id type to connect \ref Repo and sat-repo. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc Tue Jan 29 19:08:25 2008
@@ -60,9 +60,9 @@
class LookFor : public resfilter::PoolItemFilterFunctor
{
public:
- PoolItem_Ref item;
+ PoolItem item;
- bool operator()( PoolItem_Ref provider )
+ bool operator()( PoolItem provider )
{
item = provider;
return false; // stop here, we found it
@@ -72,7 +72,7 @@
// just find installed item with same kind/name as item
-PoolItem_Ref
+PoolItem
Helper::findInstalledByNameAndKind (const ResPool & pool, const string & name, const Resolvable::Kind & kind)
{
LookFor info;
@@ -90,7 +90,7 @@
// just find uninstalled item with same kind/name as item
-PoolItem_Ref
+PoolItem
Helper::findUninstalledByNameAndKind (const ResPool & pool, const string & name, const Resolvable::Kind & kind)
{
LookFor info;
@@ -109,8 +109,8 @@
// just find installed item with same kind/name as item
// does *NOT* check edition
-PoolItem_Ref
-Helper::findInstalledItem (const ResPool & pool, PoolItem_Ref item)
+PoolItem
+Helper::findInstalledItem (const ResPool & pool, PoolItem item)
{
return findInstalledByNameAndKind (pool, item->name(), item->kind() );
}
@@ -120,10 +120,10 @@
class LookForUpdate : public resfilter::PoolItemFilterFunctor
{
public:
- PoolItem_Ref uninstalled;
- PoolItem_Ref installed;
+ PoolItem uninstalled;
+ PoolItem installed;
- bool operator()( PoolItem_Ref provider )
+ bool operator()( PoolItem provider )
{
// is valid
if ( ! provider.resolvable() )
@@ -158,8 +158,8 @@
// just find best (according to edition) uninstalled item with same kind/name as item
// *DOES* check edition
-PoolItem_Ref
-Helper::findUpdateItem (const ResPool & pool, PoolItem_Ref item)
+PoolItem
+Helper::findUpdateItem (const ResPool & pool, PoolItem item)
{
LookForUpdate info;
info.installed = item;
@@ -181,9 +181,9 @@
class LookForReinstall : public resfilter::PoolItemFilterFunctor
{
public:
- PoolItem_Ref uninstalled;
+ PoolItem uninstalled;
- bool operator()( PoolItem_Ref provider )
+ bool operator()( PoolItem provider )
{
if (provider.status().isLocked()) {
return true; // search next
@@ -195,8 +195,8 @@
};
-PoolItem_Ref
-Helper::findReinstallItem (const ResPool & pool, PoolItem_Ref item)
+PoolItem
+Helper::findReinstallItem (const ResPool & pool, PoolItem item)
{
LookForReinstall info;
@@ -216,17 +216,17 @@
class CheckIfBest : public resfilter::PoolItemFilterFunctor
{
public:
- PoolItem_Ref _item;
+ PoolItem _item;
bool is_best;
- CheckIfBest( PoolItem_Ref item )
+ CheckIfBest( PoolItem item )
: _item( item )
, is_best( true ) // assume we already have the best
{}
// check if provider is better. If yes, end the search.
- bool operator()( PoolItem_Ref provider )
+ bool operator()( PoolItem provider )
{
int archcmp = _item->arch().compare( provider->arch() );
if (((archcmp < 0) // provider has a better architecture
@@ -245,7 +245,7 @@
// check if the given item is the best one of the pool
bool
-Helper::isBestUninstalledItem (const ResPool & pool, PoolItem_Ref item)
+Helper::isBestUninstalledItem (const ResPool & pool, PoolItem item)
{
CheckIfBest info( item );
@@ -260,7 +260,7 @@
}
std::string
-Helper::itemToString (PoolItem_Ref item, bool shortVersion)
+Helper::itemToString (PoolItem item, bool shortVersion)
{
ostringstream os;
if (!item) return "";
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h Tue Jan 29 19:08:25 2008
@@ -53,30 +53,30 @@
// does *NOT* check edition
// FIXME: should probably take provides/obsoletes into account for
// renamed upgrades
- static PoolItem_Ref findInstalledByNameAndKind (const ResPool & pool, const std::string & name, const Resolvable::Kind & kind);
+ static PoolItem findInstalledByNameAndKind (const ResPool & pool, const std::string & name, const Resolvable::Kind & kind);
// for name, find uninstalled item which has same name
- static PoolItem_Ref findUninstalledByNameAndKind (const ResPool & pool, const std::string & name, const Resolvable::Kind & kind);
+ static PoolItem findUninstalledByNameAndKind (const ResPool & pool, const std::string & name, const Resolvable::Kind & kind);
// for item, find installed item which has same name -> calls findInstalledByNameAndKind()
// does *NOT* check edition
// FIXME: should probably take provides/obsoletes into account for
// renamed upgrades
- static PoolItem_Ref findInstalledItem (const ResPool & pool, PoolItem_Ref item);
+ static PoolItem findInstalledItem (const ResPool & pool, PoolItem item);
// for item, find uninstalled item which has same name and higher edition
- static PoolItem_Ref findUninstalledItem (const ResPool & pool, PoolItem_Ref item);
+ static PoolItem findUninstalledItem (const ResPool & pool, PoolItem item);
// for item, find uninstalled item which has same name and equal edition
- static PoolItem_Ref findReinstallItem (const ResPool & pool, PoolItem_Ref item);
+ static PoolItem findReinstallItem (const ResPool & pool, PoolItem item);
- static PoolItem_Ref findUpdateItem (const ResPool & pool, PoolItem_Ref item);
+ static PoolItem findUpdateItem (const ResPool & pool, PoolItem item);
// for item, check if this is the 'best' uninstalled (best arch, best version) item
- static bool isBestUninstalledItem (const ResPool & pool, PoolItem_Ref item);
+ static bool isBestUninstalledItem (const ResPool & pool, PoolItem item);
// Human readable item
- static std::string itemToString (PoolItem_Ref item, bool shortVersion=false);
+ static std::string itemToString (PoolItem item, bool shortVersion=false);
static std::string capToString (const Capability & capability);
friend std::ostream& operator<<(std::ostream&, const PoolItemList & itemlist);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc Tue Jan 29 19:08:25 2008
@@ -114,7 +114,7 @@
// decrease order of every adjacent node
void
-InstallOrder::setInstalled(PoolItem_Ref item )
+InstallOrder::setInstalled(PoolItem item )
{
_dirty = true;
@@ -151,7 +151,7 @@
//-----------------------------------------------------------------------------
bool
-InstallOrder::doesProvide( const Capability requirement, PoolItem_Ref item ) const
+InstallOrder::doesProvide( const Capability requirement, PoolItem item ) const
{
Capabilities::const_iterator pend = item->dep( Dep::PROVIDES ).end();
for( Capabilities::const_iterator pit = item->dep( Dep::PROVIDES ).begin(); pit != pend; ++pit) {
@@ -159,11 +159,11 @@
return item;
}
}
- return PoolItem_Ref();
+ return PoolItem();
}
-PoolItem_Ref
+PoolItem
InstallOrder::findProviderInSet( const Capability requirement, const PoolItemSet & candidates ) const
{
for( PoolItemSet::const_iterator citer = candidates.begin(); citer != candidates.end(); citer++) {
@@ -172,16 +172,16 @@
}
}
- return PoolItem_Ref();
+ return PoolItem();
}
struct CollectProviders
{
- const PoolItem_Ref requestor;
+ const PoolItem requestor;
PoolItemList result;
const PoolItemSet & limitto; // limit search to members of this set
- CollectProviders (const PoolItem_Ref pi, const PoolItemSet & limit)
+ CollectProviders (const PoolItem pi, const PoolItemSet & limit)
: requestor (pi)
, limitto (limit)
{ }
@@ -210,7 +210,7 @@
void
-InstallOrder::rdfsvisit (const PoolItem_Ref item)
+InstallOrder::rdfsvisit (const PoolItem item)
{
typedef list<Capability> CapList;
CapList requires;
@@ -281,7 +281,7 @@
for (PoolItemList::iterator it = tovisit.begin(); it != tovisit.end(); ++it)
{
- const PoolItem_Ref must_visit = *it;
+ const PoolItem must_visit = *it;
if (_nodes[must_visit].visited == false)
{
nodeinfo.order++;
@@ -344,7 +344,7 @@
// initialize all nodes
for (PoolItemSet::iterator it = _toinstall.begin(); it != _toinstall.end(); ++it)
{
- PoolItem_Ref item = *it;
+ PoolItem item = *it;
_nodes[item] = NodeInfo (item);
_rgraph[item] = PoolItemList();
_graph[item] = PoolItemList();
@@ -353,7 +353,7 @@
// visit all nodes
for (PoolItemSet::iterator it = _toinstall.begin(); it != _toinstall.end(); ++it)
{
- const PoolItem_Ref item = *it;
+ const PoolItem item = *it;
if (_nodes[item].visited == false)
{
XXX << "start recursion on " << ITEMNAME(item) << endl;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h Tue Jan 29 19:08:25 2008
@@ -67,7 +67,7 @@
PoolItemSet _installed;
/** adjacency list type */
- typedef std::map Graph;
+ typedef std::map Graph;
/** adjacency list, package -> requirements */
Graph _graph;
@@ -82,13 +82,13 @@
bool visited;
int order; // number of incoming edges in reverse graph
- PoolItem_Ref item;
+ PoolItem item;
NodeInfo() : begintime(0), endtime(0), visited(false), order(0) {}
- NodeInfo(PoolItem_Ref item) : begintime(0), endtime(0), visited(false), order(0), item(item) {}
+ NodeInfo(PoolItem item) : begintime(0), endtime(0), visited(false), order(0), item(item) {}
};
- typedef std::map Nodes;
+ typedef std::map Nodes;
Nodes _nodes;
@@ -103,10 +103,10 @@
std::setstd::string _logset;
private:
- void rdfsvisit (PoolItem_Ref item);
+ void rdfsvisit (PoolItem item);
- PoolItem_Ref findProviderInSet( const Capability requirement, const PoolItemSet & candidates ) const;
- bool doesProvide( const Capability requirement, PoolItem_Ref item ) const;
+ PoolItem findProviderInSet( const Capability requirement, const PoolItemSet & candidates ) const;
+ bool doesProvide( const Capability requirement, PoolItem item ) const;
public:
@@ -128,7 +128,7 @@
* set a Solvable as installed, computeNextSet is able to compute a new
* set then
* */
- void setInstalled( PoolItem_Ref item );
+ void setInstalled( PoolItem item );
/**
* like above, for convenience
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.cc Tue Jan 29 19:08:25 2008
@@ -53,7 +53,7 @@
_details = "";
}
-void ProblemSolutionCombi::addSingleAction( PoolItem_Ref item, const TransactionKind action)
+void ProblemSolutionCombi::addSingleAction( PoolItem item, const TransactionKind action)
{
addAction (new TransactionSolutionAction(item, action));
actNumber++;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionCombi.h Tue Jan 29 19:08:25 2008
@@ -55,7 +55,7 @@
/**
* Add a single action
*/
- void addSingleAction( PoolItem_Ref item, const TransactionKind action);
+ void addSingleAction( PoolItem item, const TransactionKind action);
/**
* returns the number of actions
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.cc Tue Jan 29 19:08:25 2008
@@ -49,7 +49,7 @@
//---------------------------------------------------------------------------
ProblemSolutionIgnoreRequires::ProblemSolutionIgnoreRequires( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability)
: ProblemSolution (parent, "", "")
{
@@ -70,7 +70,7 @@
}
ProblemSolutionIgnoreArchitecture::ProblemSolutionIgnoreArchitecture( ResolverProblem_Ptr parent,
- PoolItem_Ref item)
+ PoolItem item)
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
@@ -83,7 +83,7 @@
}
ProblemSolutionIgnoreVendor::ProblemSolutionIgnoreVendor( ResolverProblem_Ptr parent,
- PoolItem_Ref item)
+ PoolItem item)
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
@@ -96,9 +96,9 @@
}
ProblemSolutionIgnoreConflicts::ProblemSolutionIgnoreConflicts( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability,
- PoolItem_Ref otherItem)
+ PoolItem otherItem)
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
@@ -108,7 +108,7 @@
}
ProblemSolutionIgnoreConflicts::ProblemSolutionIgnoreConflicts( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability,
PoolItemList itemList)
: ProblemSolution (parent, "", "")
@@ -123,9 +123,9 @@
}
ProblemSolutionIgnoreObsoletes::ProblemSolutionIgnoreObsoletes( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability,
- PoolItem_Ref otherItem)
+ PoolItem otherItem)
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
@@ -137,8 +137,8 @@
ProblemSolutionIgnoreInstalled::ProblemSolutionIgnoreInstalled( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
- PoolItem_Ref otherItem)
+ PoolItem item,
+ PoolItem otherItem)
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionIgnore.h Tue Jan 29 19:08:25 2008
@@ -48,11 +48,11 @@
* Constructor.
**/
ProblemSolutionIgnoreConflicts( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability,
- PoolItem_Ref otherItem);
+ PoolItem otherItem);
ProblemSolutionIgnoreConflicts( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability,
PoolItemList itemList);
};
@@ -65,7 +65,7 @@
* Constructor.
**/
ProblemSolutionIgnoreRequires( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability);
ProblemSolutionIgnoreRequires( ResolverProblem_Ptr parent,
PoolItemList itemList,
@@ -80,7 +80,7 @@
* Constructor.
**/
ProblemSolutionIgnoreArchitecture( ResolverProblem_Ptr parent,
- PoolItem_Ref item);
+ PoolItem item);
};
class ProblemSolutionIgnoreVendor : public ProblemSolution
@@ -91,7 +91,7 @@
* Constructor.
**/
ProblemSolutionIgnoreVendor( ResolverProblem_Ptr parent,
- PoolItem_Ref item);
+ PoolItem item);
};
class ProblemSolutionIgnoreObsoletes : public ProblemSolution
@@ -102,9 +102,9 @@
* Constructor.
**/
ProblemSolutionIgnoreObsoletes( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
+ PoolItem item,
const Capability & capability,
- PoolItem_Ref otherItem);
+ PoolItem otherItem);
};
class ProblemSolutionIgnoreInstalled : public ProblemSolution
@@ -115,8 +115,8 @@
* Constructor.
**/
ProblemSolutionIgnoreInstalled( ResolverProblem_Ptr parent,
- PoolItem_Ref item,
- PoolItem_Ref otherItem);
+ PoolItem item,
+ PoolItem otherItem);
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.cc Tue Jan 29 19:08:25 2008
@@ -47,7 +47,7 @@
//---------------------------------------------------------------------------
ProblemSolutionInstall::ProblemSolutionInstall( ResolverProblem_Ptr parent,
- PoolItem_Ref item )
+ PoolItem item )
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
@@ -67,7 +67,7 @@
for (PoolItemList::iterator iter = itemList.begin();
iter != itemList.end(); iter++) {
- PoolItem_Ref item = *iter;
+ PoolItem item = *iter;
addAction ( new TransactionSolutionAction (item, INSTALL));
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionInstall.h Tue Jan 29 19:08:25 2008
@@ -47,7 +47,7 @@
/**
* Constructor.
**/
- ProblemSolutionInstall( ResolverProblem_Ptr parent, PoolItem_Ref item);
+ ProblemSolutionInstall( ResolverProblem_Ptr parent, PoolItem item);
ProblemSolutionInstall( ResolverProblem_Ptr parent, PoolItemList & itemlist );
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.cc Tue Jan 29 19:08:25 2008
@@ -46,7 +46,7 @@
//---------------------------------------------------------------------------
ProblemSolutionKeep::ProblemSolutionKeep( ResolverProblem_Ptr parent,
- PoolItem_Ref item )
+ PoolItem item )
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
@@ -66,7 +66,7 @@
for (PoolItemList::iterator iter = itemList.begin();
iter != itemList.end(); iter++) {
- PoolItem_Ref item = *iter;
+ PoolItem item = *iter;
addAction ( new TransactionSolutionAction (item, KEEP));
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionKeep.h Tue Jan 29 19:08:25 2008
@@ -47,7 +47,7 @@
/**
* Constructor.
**/
- ProblemSolutionKeep( ResolverProblem_Ptr parent, PoolItem_Ref item);
+ ProblemSolutionKeep( ResolverProblem_Ptr parent, PoolItem item);
ProblemSolutionKeep( ResolverProblem_Ptr parent, PoolItemList & itemlist );
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.cc Tue Jan 29 19:08:25 2008
@@ -44,7 +44,7 @@
IMPL_PTR_TYPE(ProblemSolutionUninstall);
//---------------------------------------------------------------------------
-ProblemSolutionUninstall::ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem_Ref item,
+ProblemSolutionUninstall::ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem item,
const std::string & descr,
const std::string & detail)
: ProblemSolution (parent, descr, detail)
@@ -55,7 +55,7 @@
ProblemSolutionUninstall::ProblemSolutionUninstall( ResolverProblem_Ptr parent,
- PoolItem_Ref item)
+ PoolItem item)
: ProblemSolution (parent, "", "")
{
ResStatus status = item.status();
@@ -82,7 +82,7 @@
for (PoolItemList::iterator iter = itemlist.begin();
iter != itemlist.end(); iter++) {
- PoolItem_Ref item = *iter;
+ PoolItem item = *iter;
addAction ( new TransactionSolutionAction (item, REMOVE));
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUninstall.h Tue Jan 29 19:08:25 2008
@@ -47,8 +47,8 @@
/**
* Constructor.
**/
- ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem_Ref item);
- ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem_Ref item,
+ ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem item);
+ ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem item,
const std::string & descr,
const std::string & detail);
ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItemList & itemlist);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc Tue Jan 29 19:08:25 2008
@@ -55,7 +55,7 @@
: _problemSolutionUnlock( solution )
{ }
- bool operator()( PoolItem_Ref item )
+ bool operator()( PoolItem item )
{
_problemSolutionUnlock.addAction ( new TransactionSolutionAction (item, UNLOCK));
return true;
@@ -76,7 +76,7 @@
}
ProblemSolutionUnlock::ProblemSolutionUnlock( ResolverProblem_Ptr parent,
- PoolItem_Ref item)
+ PoolItem item)
: ProblemSolution (parent, "", "")
{
// TranslatorExplanation %s = name of package, patch, selection ...
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ProblemSolutionUnlock.h Tue Jan 29 19:08:25 2008
@@ -47,7 +47,7 @@
/**
* Constructor.
**/
- ProblemSolutionUnlock( ResolverProblem_Ptr parent, PoolItem_Ref item);
+ ProblemSolutionUnlock( ResolverProblem_Ptr parent, PoolItem item);
ProblemSolutionUnlock( ResolverProblem_Ptr parent, PoolItemList & itemlist);
ProblemSolutionUnlock( ResolverProblem_Ptr parent, const ResPool & pool);
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc Tue Jan 29 19:08:25 2008
@@ -124,40 +124,40 @@
}
void
-Resolver::addIgnoreConflict (const PoolItem_Ref item,
+Resolver::addIgnoreConflict (const PoolItem item,
const Capability & capability)
{
_ignoreConflicts.insert(make_pair(item, capability));
}
void
-Resolver::addIgnoreRequires (const PoolItem_Ref item,
+Resolver::addIgnoreRequires (const PoolItem item,
const Capability & capability)
{
_ignoreRequires.insert(make_pair(item, capability));
}
void
-Resolver::addIgnoreObsoletes (const PoolItem_Ref item,
+Resolver::addIgnoreObsoletes (const PoolItem item,
const Capability & capability)
{
_ignoreObsoletes.insert(make_pair(item, capability));
}
void
-Resolver::addIgnoreInstalledItem (const PoolItem_Ref item)
+Resolver::addIgnoreInstalledItem (const PoolItem item)
{
_ignoreInstalledItem.push_back (item);
}
void
-Resolver::addIgnoreArchitectureItem (const PoolItem_Ref item)
+Resolver::addIgnoreArchitectureItem (const PoolItem item)
{
_ignoreArchitectureItem.push_back (item);
}
void
-Resolver::addIgnoreVendorItem (const PoolItem_Ref item)
+Resolver::addIgnoreVendorItem (const PoolItem item)
{
_ignoreVendorItem.push_back (item);
}
@@ -171,7 +171,7 @@
:resStatus(status)
{ }
- bool operator()( PoolItem_Ref item ) // only transacts() items go here
+ bool operator()( PoolItem item ) // only transacts() items go here
{
item.status().resetTransact( resStatus );// clear any solver/establish transactions
return true;
@@ -186,7 +186,7 @@
:resStatus(status)
{ }
- bool operator()( PoolItem_Ref item ) // only transacts() items go here
+ bool operator()( PoolItem item ) // only transacts() items go here
{
item.status().setTransact( true, resStatus );
return true;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h Tue Jan 29 19:08:25 2008
@@ -74,7 +74,7 @@
CapabilitySet _extra_requires;
CapabilitySet _extra_conflicts;
- typedef std::multimap IgnoreMap;
+ typedef std::multimap IgnoreMap;
// These conflict should be ignored of the concering item
IgnoreMap _ignoreConflicts;
@@ -99,8 +99,8 @@
bool _verifying; // The system will be checked
// helpers
- bool doesObsoleteCapability (PoolItem_Ref candidate, const Capability & cap);
- bool doesObsoleteItem (PoolItem_Ref candidate, PoolItem_Ref installed);
+ bool doesObsoleteCapability (PoolItem candidate, const Capability & cap);
+ bool doesObsoleteItem (PoolItem candidate, PoolItem installed);
public:
@@ -127,15 +127,15 @@
const CapabilitySet extraRequires () { return _extra_requires; }
const CapabilitySet extraConflicts () { return _extra_conflicts; }
- void addIgnoreConflict (const PoolItem_Ref item,
+ void addIgnoreConflict (const PoolItem item,
const Capability & capability);
- void addIgnoreRequires (const PoolItem_Ref item,
+ void addIgnoreRequires (const PoolItem item,
const Capability & capability);
- void addIgnoreObsoletes (const PoolItem_Ref item,
+ void addIgnoreObsoletes (const PoolItem item,
const Capability & capability);
- void addIgnoreInstalledItem (const PoolItem_Ref item);
- void addIgnoreArchitectureItem (const PoolItem_Ref item);
- void addIgnoreVendorItem (const PoolItem_Ref item);
+ void addIgnoreInstalledItem (const PoolItem item);
+ void addIgnoreArchitectureItem (const PoolItem item);
+ void addIgnoreVendorItem (const PoolItem item);
void setForceResolve (const bool force) { _forceResolve = force; }
bool forceResolve() { return _forceResolve; }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc Tue Jan 29 19:08:25 2008
@@ -74,14 +74,14 @@
* \li best Edition
* \li ResObject::constPtr as fallback.
*/
-struct AVOrder : public std::binary_function
+struct AVOrder : public std::binary_function
{
// NOTE: operator() provides LESS semantics to order the set.
// So LESS means 'prior in set'. We want 'better' archs and
// 'better' editions at the beginning of the set. So we return
// TRUE if (lhs > rhs)!
//
- bool operator()( const PoolItem_Ref lhs, const PoolItem_Ref rhs ) const
+ bool operator()( const PoolItem lhs, const PoolItem rhs ) const
{
int res = lhs->arch().compare( rhs->arch() );
if ( res )
@@ -97,7 +97,7 @@
}
};
-typedef std::set PoolItemOrderSet;
+typedef std::set PoolItemOrderSet;
@@ -108,7 +108,7 @@
// newer.
static bool
-downgrade_allowed( PoolItem_Ref installed, PoolItem_Ref candidate, bool silent_downgrades )
+downgrade_allowed( PoolItem installed, PoolItem candidate, bool silent_downgrades )
{
if (installed.status().isLocked()) {
MIL << "Installed " << installed << " is locked, not upgrading" << endl;
@@ -159,7 +159,7 @@
// does the candidate obsolete the capability ?
bool
-Resolver::doesObsoleteCapability (PoolItem_Ref candidate, const Capability & cap)
+Resolver::doesObsoleteCapability (PoolItem candidate, const Capability & cap)
{
_DEBUG("doesObsoleteCapability " << candidate << ", " << cap);
@@ -176,7 +176,7 @@
bool
-Resolver::doesObsoleteItem (PoolItem_Ref candidate, PoolItem_Ref installed)
+Resolver::doesObsoleteItem (PoolItem candidate, PoolItem installed)
{
Capability installedCap( installed->name(), Rel::EQ, installed->edition(), installed->kind());
return doesObsoleteCapability (candidate, installedCap);
@@ -186,7 +186,7 @@
// find best available providers for installed name
-typedef map FindMap;
+typedef map FindMap;
struct FindProviders
{
@@ -255,14 +255,14 @@
{
public:
bool found;
- PoolItem_Ref candidate;
+ PoolItem candidate;
- LookForSelected (PoolItem_Ref can)
+ LookForSelected (PoolItem can)
: found (false),
candidate (can)
{ }
- bool operator()( PoolItem_Ref item )
+ bool operator()( PoolItem item )
{
if (item.status().isToBeInstalled()
&& item->edition() == candidate->edition()
@@ -275,7 +275,7 @@
}
};
-bool setForInstallation (const ResPool &pool, PoolItem_Ref item) {
+bool setForInstallation (const ResPool &pool, PoolItem item) {
LookForSelected info(item);
invokeOnEach( pool.byNameBegin (item->name()),
@@ -305,8 +305,8 @@
void
Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
{
- typedef map CandidateMap;
- typedef map TodoMap;
+ typedef map CandidateMap;
+ typedef map TodoMap;
CandidateMap candidatemap;
@@ -350,9 +350,9 @@
PoolItemOrderSet available; // candidates available for install (no matter if selected for install or not)
for ( ResPool::const_iterator it = _pool.begin(); it != _pool.end(); ++it ) {
- PoolItem_Ref item = *it;
- PoolItem_Ref candidate;
- PoolItem_Ref installed;
+ PoolItem item = *it;
+ PoolItem candidate;
+ PoolItem installed;
if ( item.status().isToBeUninstalled() ) {
MIL << "doUpgrade available: SKIP to delete " << item << endl;
@@ -449,7 +449,7 @@
for ( ResPool::const_iterator it = _pool.begin(); it != _pool.end(); ++it ) {
- PoolItem_Ref installed(*it);
+ PoolItem installed(*it);
ResStatus status (installed.status());
if ( ! status.staysInstalled() ) {
@@ -499,7 +499,7 @@
///////////////////////////////////////////////////////////////////
if ( cand_it != candidatemap.end() ) {
- PoolItem_Ref candidate (cand_it->second);
+ PoolItem candidate (cand_it->second);
if ( ! candidate.status().isToBeInstalled() ) {
int cmp = installed->edition().compare( candidate->edition() );
@@ -610,7 +610,7 @@
PoolItemOrderSet & tset( it->second ); // these are the providers (well, just one)
for ( PoolItemOrderSet::iterator sit = tset.begin(); sit != tset.end(); ++sit ) {
- PoolItem_Ref provider (*sit);
+ PoolItem provider (*sit);
if (setForInstallation (_pool, provider)) {
++opt_stats_r.chk_replaced;
@@ -630,11 +630,11 @@
for ( TodoMap::iterator it = addMultiProvided.begin(); it != addMultiProvided.end(); ++it ) {
MIL << "GET ONE OUT OF " << it->second.size() << " for " << it->first << endl;
- PoolItem_Ref guess;
+ PoolItem guess;
PoolItemOrderSet & gset( it->second );
for ( PoolItemOrderSet::iterator git = gset.begin(); git != gset.end(); ++git ) {
- PoolItem_Ref item (*git);
+ PoolItem item (*git);
if (git == gset.begin()) // default to first of set; the set is ordered, first is the best
guess = item;
@@ -644,7 +644,7 @@
if ( ! doesObsoleteItem (item, it->first ) ) {
it->first.status().setToBeUninstalled( ResStatus::APPL_HIGH );
}
- guess = PoolItem_Ref();
+ guess = PoolItem();
break;
} else {
// Be prepared to guess.
@@ -680,14 +680,14 @@
requested_locale_match = false;
for ( PoolItemOrderSet::iterator git = gset.begin(); git != gset.end(); ++git ) {
- PoolItem_Ref item (*git);
+ PoolItem item (*git);
if ( item.status().isToBeInstalled()) {
MIL << " ==> (pass 2: meanwhile set to install): " << item << endl;
if ( ! doesObsoleteItem (item, it->first ) ) {
it->first.status().setToBeUninstalled( ResStatus::APPL_HIGH );
}
- guess = PoolItem_Ref();
+ guess = PoolItem();
break;
} else {
freshens = item->dep( Dep::FRESHENS );
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc Tue Jan 29 19:08:25 2008
@@ -170,7 +170,7 @@
InjectSolutionAction::execute(Resolver & resolver) const
{
Capabilities depList;
- if (_item != PoolItem_Ref()) {
+ if (_item != PoolItem()) {
depList = _item.resolvable()->dep(Dep::CONFLICTS);
}
switch (_kind) {
@@ -210,7 +210,7 @@
break;
case REQUIRES:
// removing the requires dependency from the item
- if (_item == PoolItem_Ref()) {
+ if (_item == PoolItem()) {
// this was a requirement via Resolver::addExtraCapability
// so we have to delete it.
resolver.removeExtraRequire (_capability);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.h Tue Jan 29 19:08:25 2008
@@ -74,7 +74,7 @@
class TransactionSolutionAction: public SolutionAction
{
public:
- TransactionSolutionAction( PoolItem_Ref item,
+ TransactionSolutionAction( PoolItem item,
TransactionKind action )
: SolutionAction(),
_item( item ), _action( action ) {}
@@ -90,7 +90,7 @@
// ---------------------------------- accessors
- const PoolItem_Ref item() const { return _item; }
+ const PoolItem item() const { return _item; }
TransactionKind action() const { return _action; }
// ---------------------------------- methods
@@ -98,7 +98,7 @@
protected:
- PoolItem_Ref _item;
+ PoolItem _item;
const TransactionKind _action;
};
@@ -129,23 +129,23 @@
{
public:
- InjectSolutionAction( PoolItem_Ref item,
+ InjectSolutionAction( PoolItem item,
const Capability & capability,
const InjectSolutionKind & kind)
: SolutionAction(),
_item( item ), _capability( capability ),
_kind( kind ), _otherItem() {}
- InjectSolutionAction( PoolItem_Ref item,
+ InjectSolutionAction( PoolItem item,
const InjectSolutionKind & kind)
: SolutionAction(),
_item( item ), _capability(),
_kind( kind ), _otherItem() {}
- InjectSolutionAction( PoolItem_Ref item,
+ InjectSolutionAction( PoolItem item,
const Capability & capability,
const InjectSolutionKind & kind,
- PoolItem_Ref otherItem)
+ PoolItem otherItem)
: SolutionAction(),
_item( item ), _capability( capability ),
_kind( kind ), _otherItem( otherItem ) {}
@@ -157,16 +157,16 @@
// ---------------------------------- accessors
const Capability & capability() const { return _capability; };
- const PoolItem_Ref item() const { return _item; }
+ const PoolItem item() const { return _item; }
// ---------------------------------- methods
virtual bool execute(Resolver & resolver) const;
protected:
- PoolItem_Ref _item;
+ PoolItem _item;
const Capability _capability;
const InjectSolutionKind _kind;
- PoolItem_Ref _otherItem;
+ PoolItem _otherItem;
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc Tue Jan 29 19:08:25 2008
@@ -168,7 +168,7 @@
return out.str();
}
-std::string helixXML( const PoolItem_Ref &item )
+std::string helixXML( const PoolItem &item )
{
const Resolvable::constPtr resolvable = item.resolvable();
stringstream str;
@@ -356,7 +356,7 @@
}
-void HelixResolvable::addResolvable(const PoolItem_Ref item)
+void HelixResolvable::addResolvable(const PoolItem item)
{
*file << helixXML (item);
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h Tue Jan 29 19:08:25 2008
@@ -56,7 +56,7 @@
std::string helixXML( const Dependencies &dep );
template<>
-std::string helixXML( const PoolItem_Ref &item );
+std::string helixXML( const PoolItem &item );
///////////////////////////////////////////////////////////////////
@@ -76,7 +76,7 @@
HelixResolvable (const std::string & path);
~HelixResolvable ();
- void addResolvable (const PoolItem_Ref item);
+ void addResolvable (const PoolItem item);
std::string filename () { return dumpFile; }
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Types.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Types.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Types.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Types.h Tue Jan 29 19:08:25 2008
@@ -48,8 +48,8 @@
namespace detail
{ ///////////////////////////////////////////////////////////////////
-typedef std::list PoolItemList;
-typedef std::set PoolItemSet;
+typedef std::list<PoolItem> PoolItemList;
+typedef std::set<PoolItem> PoolItemSet;
DEFINE_PTR_TYPE(Resolver);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc Tue Jan 29 19:08:25 2008
@@ -635,9 +635,9 @@
if (true) // !installOnly - only on Package?!
{
// this would delete the same item over and over
- //for (PoolItem_Ref old = Helper::findInstalledItem (pool_r, *it); old; )
+ //for (PoolItem old = Helper::findInstalledItem (pool_r, *it); old; )
#warning REMOVE ALL OLD VERSIONS AND NOT JUST ONE
- PoolItem_Ref old = Helper::findInstalledItem (pool_r, *it);
+ PoolItem old = Helper::findInstalledItem (pool_r, *it);
if (old)
{
_storage.deleteObject(old.resolvable());
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h Tue Jan 29 19:08:25 2008
@@ -55,10 +55,10 @@
public:
/** list of pool items */
- typedef std::list PoolItemList;
+ typedef std::list<PoolItem> PoolItemList;
/** set of pool items */
- typedef std::set PoolItemSet;
+ typedef std::set<PoolItem> PoolItemSet;
public:
/** Ctor. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ui/Selectable.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ui/Selectable.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ui/Selectable.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ui/Selectable.h Tue Jan 29 19:08:25 2008
@@ -42,8 +42,6 @@
*
* \note There's one Selectable per installed item, in case more
* than one item is intalled.
- *
- * \todo Make it a _Ref.
*/
class Selectable : public base::ReferenceCounted, private base::NonCopyable
{
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc Tue Jan 29 19:08:25 2008
@@ -145,9 +145,8 @@
//
ZYppImpl::ZYppImpl()
: _textLocale( defaultTextLocale() )
- , _pool()
, _target(0)
- , _resolver( new Resolver(_pool.accessor()) )
+ , _resolver( new Resolver( ResPool::instance()) )
, _architecture( defaultArchitecture() )
{
MIL << "libzypp: " << VERSION << " built " << __DATE__ << " " << __TIME__ << endl;
@@ -170,30 +169,6 @@
//------------------------------------------------------------------------
// add/remove resolvables
- void ZYppImpl::addResolvables (const ResStore& store, bool installed)
- {
- _pool.insert(store.begin(), store.end(), installed);
- }
-
- void ZYppImpl::removeResolvables (const ResStore& store)
- {
- for (ResStore::iterator it = store.begin(); it != store.end(); ++it)
- {
- _pool.erase(*it);
- }
- }
-
- void ZYppImpl::removeInstalledResolvables ()
- {
- for (ResPool::const_iterator it = pool().begin(); it != pool().end();)
- {
- ResPool::const_iterator next = it; ++next;
- if (it->status().isInstalled())
- _pool.erase( *it );
- it = next;
- }
- }
-
DiskUsageCounter::MountPointSet ZYppImpl::diskUsage()
{
if ( ! _disk_usage )
@@ -235,35 +210,22 @@
MIL << "Repeated call to initializeTarget()" << endl;
return;
}
+#warning NEED SOME NEW WAY TO INDICATE NEDD OF TARGET RELOAD
+#if 0
removeInstalledResolvables( );
+#endif
}
_target = new Target( root );
_target->enableStorage( root );
}
- void ZYppImpl::initTarget(const Pathname & root, bool commit_only)
- {
- MIL << "initTarget( " << root << ", " << commit_only << ")" << endl;
- if (_target) {
- if (_target->root() == root) {
- MIL << "Repeated call to initTarget()" << endl;
- return;
- }
- removeInstalledResolvables( );
- }
- _target = new Target( root );
- _target->enableStorage( root );
- if (!commit_only)
- {
- addResolvables( _target->resolvables(), true );
- }
- }
-
-
void ZYppImpl::finishTarget()
{
+#warning NEED SOME NEW WAY TO UNLOAD THE POOL
+#if 0
if (_target)
removeInstalledResolvables();
+#endif
_target = 0;
}
@@ -290,12 +252,15 @@
// target->resolvables(). Actually the target should do this without
// foreign help.
_target->reset();
+#warning NEED SOME NEW WAY TO INDICATE NEDD OF TARGET RELOAD
+#if 0
removeInstalledResolvables();
if ( policy_r.syncPoolAfterCommit() )
{
// reload new status from target
addResolvables( _target->resolvables(), true );
}
+#endif
}
MIL << "Commit (" << policy_r << ") returned: "
@@ -316,7 +281,9 @@
/** */
void ZYppImpl::setRequestedLocales( const LocaleSet & locales_r )
{
- ResPool mpool( pool() );
+#warning REIMPLEMENT WITHOUT LANGUAGE RESOLVABLE
+#if 0
+ ResPool mpool( ResPool::instance() );
// assert all requested are available
for ( LocaleSet::const_iterator it = locales_r.begin();
it != locales_r.end(); ++it )
@@ -365,19 +332,23 @@
select.availableBegin()->status().resetTransact( ResStatus::USER );
}
}
+#endif
}
/** */
ZYppImpl::LocaleSet ZYppImpl::getAvailableLocales() const
{
ZYpp::LocaleSet ret;
- ResPool mpool( pool() );
+#warning REIMPLEMENT WITHOUT LANGUAGE RESOLVABLE
+#if 0
+ ResPool mpool( ResPool::instance() );
for ( ResPool::byKind_iterator it = mpool.byKindBegin<Language>();
it != mpool.byKindEnd<Language>(); ++it )
{
if ( (*it).status().isUninstalled() ) // available!
ret.insert( Locale( (*it)->name() ) );
}
+#endif
return ret;
}
@@ -385,7 +356,9 @@
ZYppImpl::LocaleSet ZYppImpl::getRequestedLocales() const
{
ZYpp::LocaleSet ret;
- ResPool mpool( pool() );
+#warning REIMPLEMENT WITHOUT LANGUAGE RESOLVABLE
+#if 0
+ ResPool mpool( ResPool::instance() );
for ( ResPool::byKind_iterator it = mpool.byKindBegin<Language>();
it != mpool.byKindEnd<Language>(); ++it )
{
@@ -397,12 +370,16 @@
&& select.availableBegin()->status().getTransactValue() == ResStatus::TRANSACT )
ret.insert( Locale( (*it)->name() ) );
}
+#endif
return ret;
}
void ZYppImpl::availableLocale( const Locale & locale_r )
{
+#warning REIMPLEMENT WITHOUT LANGUAGE RESOLVABLE
+#if 0
_pool.insert( Language::availableInstance( locale_r ) );
+#endif
}
//------------------------------------------------------------------------
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.h?rev=8392&r1=8391&r2=8392&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.h Tue Jan 29 19:08:25 2008
@@ -15,7 +15,6 @@
#include <iosfwd>
#include "zypp/TmpPath.h"
-#include "zypp/ResPoolManager.h"
#include "zypp/Target.h"
#include "zypp/Resolver.h"
#include "zypp/Locale.h"
@@ -48,16 +47,13 @@
/** Dtor */
~ZYppImpl();
- private:
- void removeInstalledResolvables ();
-
public:
/** */
ResPool pool() const
- { return _pool.accessor(); }
+ { return ResPool::instance(); }
ResPoolProxy poolProxy() const
- { return _pool.proxy(); }
+ { return ResPool::instance().proxy(); }
/** */
KeyRing_Ptr keyRing() const
@@ -67,10 +63,6 @@
Resolver_Ptr resolver() const
{ return _resolver; }
- void addResolvables (const ResStore& store, bool installed = false);
-
- void removeResolvables (const ResStore& store);
-
public:
/** \todo Signal locale change. */
/**
@@ -86,12 +78,6 @@
/**
* \throws Exception
- * if commit_only == true, just init the target, dont populate store or pool
- */
- ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only);
-
- /**
- * \throws Exception
*/
void finishTarget();
@@ -147,13 +133,11 @@
DiskUsageCounter::MountPointSet getPartitions() const;
public:
-
+
int applyLocks();
-
+
private:
/** */
- ResPoolManager _pool;
- /** */
Target_Ptr _target;
/** */
Resolver_Ptr _resolver;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org