Author: mlandres
Date: Mon Mar 17 18:16:23 2008
New Revision: 9183
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9183&view=rev
Log:
remove obsolete capability handling stuff
Removed:
trunk/libzypp/zypp/CapAndItem.h
trunk/libzypp/zypp/CapFilters.h
trunk/libzypp/zypp/CapMatchHelper.h
Modified:
trunk/libzypp/devel/devel.aschnell/parse1.cc
trunk/libzypp/devel/devel.aschnell/parse2.cc
trunk/libzypp/devel/devel.ma/Ex.cc
trunk/libzypp/devel/devel.ma/NewPool.cc
trunk/libzypp/devel/devel.ma/Parse.cc
trunk/libzypp/devel/devel.ma/testdrafts/BitField.cc
trunk/libzypp/devel/devel.ma/testdrafts/CompareBy.cc
trunk/libzypp/tests/repo/RepoVariables_test.cc
trunk/libzypp/tests/zypp/TranslatedText_test.cc
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/Capability.h
trunk/libzypp/zypp/Locks.cc
trunk/libzypp/zypp/OnMediaLocation.h
trunk/libzypp/zypp/ResFilters.h
trunk/libzypp/zypp/ResPool.cc
trunk/libzypp/zypp/ResPool.h
trunk/libzypp/zypp/ZConfig.h
trunk/libzypp/zypp/pool/PoolImpl.cc
trunk/libzypp/zypp/pool/PoolImpl.h
trunk/libzypp/zypp/pool/PoolTraits.h
trunk/libzypp/zypp/sat/SATResolver.cc
trunk/libzypp/zypp/solver/detail/Helper.cc
trunk/libzypp/zypp/solver/detail/InstallOrder.cc
trunk/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc
trunk/libzypp/zypp/solver/detail/Resolver.cc
trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc
trunk/libzypp/zypp/solver/detail/Resolver_problems.cc
trunk/libzypp/zypp/target/TargetImpl.cc
trunk/libzypp/zypp/ui/PatternExpander.cc
Modified: trunk/libzypp/devel/devel.aschnell/parse1.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.aschnell/parse1.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.aschnell/parse1.cc (original)
+++ trunk/libzypp/devel/devel.aschnell/parse1.cc Mon Mar 17 18:16:23 2008
@@ -10,7 +10,6 @@
#include "zypp/ResPoolProxy.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/Package.h"
#include "zypp/Pattern.h"
#include "zypp/Language.h"
Modified: trunk/libzypp/devel/devel.aschnell/parse2.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.aschnell/parse2.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.aschnell/parse2.cc (original)
+++ trunk/libzypp/devel/devel.aschnell/parse2.cc Mon Mar 17 18:16:23 2008
@@ -11,7 +11,6 @@
#include "zypp/ResPool.h"
#include "zypp/ResPoolManager.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/Package.h"
#include "zypp/Pattern.h"
#include "zypp/Language.h"
Modified: trunk/libzypp/devel/devel.ma/Ex.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Ex.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Ex.cc (original)
+++ trunk/libzypp/devel/devel.ma/Ex.cc Mon Mar 17 18:16:23 2008
@@ -8,13 +8,11 @@
#include "zypp/ZYppFactory.h"
#include "zypp/ResPoolProxy.h"
-#include
#include "zypp/ZYppCallbacks.h"
#include "zypp/NVRAD.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/Package.h"
#include "zypp/Pattern.h"
#include "zypp/Language.h"
Modified: trunk/libzypp/devel/devel.ma/NewPool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/NewPool.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/NewPool.cc (original)
+++ trunk/libzypp/devel/devel.ma/NewPool.cc Mon Mar 17 18:16:23 2008
@@ -16,7 +16,6 @@
#include "zypp/NVRAD.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/ResObjects.h"
#include "zypp/Digest.h"
#include "zypp/PackageKeyword.h"
@@ -316,14 +315,20 @@
{
virtual Action requestMedia( Url & source
, unsigned mediumNr
+ , const std::string & label
, Error error
- , const std::string & description )
+ , const std::string & description
+ , const std::vectorstd::string & devices
+ , unsigned int & dev_current )
{
SEC << __FUNCTION__ << endl
<< " " << source << endl
<< " " << mediumNr << endl
+ << " " << label << endl
<< " " << error << endl
- << " " << description << endl;
+ << " " << description << endl
+ << " " << devices << endl
+ << " " << dev_current << endl;
return IGNORE;
}
};
Modified: trunk/libzypp/devel/devel.ma/Parse.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Parse.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Parse.cc (original)
+++ trunk/libzypp/devel/devel.ma/Parse.cc Mon Mar 17 18:16:23 2008
@@ -8,13 +8,11 @@
#include "zypp/ZYppFactory.h"
#include "zypp/ResPoolProxy.h"
-#include
#include "zypp/ZYppCallbacks.h"
#include "zypp/NVRAD.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/Package.h"
#include "zypp/Pattern.h"
#include "zypp/Language.h"
Modified: trunk/libzypp/devel/devel.ma/testdrafts/BitField.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/testdrafts/BitField.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/testdrafts/BitField.cc (original)
+++ trunk/libzypp/devel/devel.ma/testdrafts/BitField.cc Mon Mar 17 18:16:23 2008
@@ -20,7 +20,6 @@
#include "zypp/NVRAD.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include
#include
Modified: trunk/libzypp/devel/devel.ma/testdrafts/CompareBy.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/testdrafts/CompareBy.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/testdrafts/CompareBy.cc (original)
+++ trunk/libzypp/devel/devel.ma/testdrafts/CompareBy.cc Mon Mar 17 18:16:23 2008
@@ -15,7 +15,6 @@
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include
#include
Modified: trunk/libzypp/tests/repo/RepoVariables_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/repo/RepoVariables_test.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/tests/repo/RepoVariables_test.cc (original)
+++ trunk/libzypp/tests/repo/RepoVariables_test.cc Mon Mar 17 18:16:23 2008
@@ -30,7 +30,7 @@
BOOST_CHECK_EQUAL(replacer1("http://foo/$arch/bar"),
"http://foo/"+ ZConfig::instance().systemArchitecture().asString() + "/bar");
- getZYpp()->setArchitecture(Arch("i686"));
+ ZConfig::instance().setSystemArchitecture(Arch("i686"));
BOOST_CHECK_EQUAL(replacer1("http://foo/$arch/bar/$basearch"),
"http://foo/i686/bar/i386");
Modified: trunk/libzypp/tests/zypp/TranslatedText_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/TranslatedText_test.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/tests/zypp/TranslatedText_test.cc (original)
+++ trunk/libzypp/tests/zypp/TranslatedText_test.cc Mon Mar 17 18:16:23 2008
@@ -4,8 +4,7 @@
#include "zypp/base/Logger.h"
#include "zypp/TranslatedText.h"
-#include "zypp/ZYppFactory.h"
-#include "zypp/ZYpp.h"
+#include "zypp/ZConfig.h"
#include
@@ -17,13 +16,9 @@
BOOST_AUTO_TEST_CASE(translatedtext_test)
{
- ZYpp::Ptr god;
-
- god = getZYpp();
-
TranslatedText testTT;
MIL << "Locale: en" << std::endl;
- god->setTextLocale(Locale("en"));
+ ZConfig::instance().setTextLocale(Locale("en"));
testTT.setText("default");
MIL << "value: '" << testTT.text() << "'" << std::endl;
BOOST_CHECK_EQUAL( testTT.text(), "default" );
@@ -32,7 +27,7 @@
BOOST_CHECK_EQUAL( testTT.text(), "default english" );
MIL << "Locale: es_ES" << std::endl;
- god->setTextLocale(Locale("es_ES"));
+ ZConfig::instance().setTextLocale(Locale("es_ES"));
BOOST_CHECK_EQUAL( testTT.text(), "default english" );
@@ -45,7 +40,7 @@
BOOST_CHECK_EQUAL( testTT.text(), "hola Spain" );
MIL << "Locale: null" << std::endl;
- god->setTextLocale(Locale());
+ ZConfig::instance().setTextLocale(Locale());
BOOST_CHECK_EQUAL( testTT.text(), "default" );
}
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Mon Mar 17 18:16:23 2008
@@ -95,10 +95,7 @@
Callback.h
Capabilities.h
Capability.h
- CapAndItem.h
- CapFilters.h
CapMatch.h
- CapMatchHelper.h
Changelog.h
CheckSum.h
CountryCode.h
Modified: trunk/libzypp/zypp/Capability.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Capability.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/Capability.h (original)
+++ trunk/libzypp/zypp/Capability.h Mon Mar 17 18:16:23 2008
@@ -57,10 +57,6 @@
private base::SafeBool<Capability>
{
public:
- // legacy
- std::string index() const ZYPP_DEPRECATED;
-
- public:
enum CtorFlag { PARSED, UNPARSED };
public:
@@ -293,12 +289,6 @@
inline CapDetail Capability::detail() const { return CapDetail( _id ); }
- inline std::string Capability::index() const
- {
- CapDetail cap( _id );
- return( cap.isSimple() ? cap.name().asString() : std::string() );
- }
-
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/Locks.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Locks.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/Locks.cc (original)
+++ trunk/libzypp/zypp/Locks.cc Mon Mar 17 18:16:23 2008
@@ -11,12 +11,11 @@
#include <fstream>
#include
-#include
-#include
+#include "zypp/base/Regex.h"
+#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
#include "zypp/base/IOStream.h"
#include "zypp/PoolItem.h"
-#include "zypp/CapMatchHelper.h"
#undef ZYPP_BASE_LOGGER_LOGGROUP
#define ZYPP_BASE_LOGGER_LOGGROUP "locks"
@@ -32,7 +31,7 @@
{
namespace locks
{
-
+#if 0
//
// collect matching names
//
@@ -89,29 +88,12 @@
return regexed;
}
-
+#endif
//
// assign Lock to installed pool item
//
-struct ItemLockerFunc
-{
- ItemLockerFunc( const string lock_str )
- : _lock_str(lock_str)
- {}
-
- bool operator()( const CapAndItem &cai_r )
- {
- PoolItem item(cai_r.item);
- MIL << "Locking " << cai_r.item << "(matched by " << _lock_str << ")" << endl;
- item.status().setLock( true, ResStatus::USER);
- return true;
- }
-
- string _lock_str;
-};
-
struct AddLockToPool
{
AddLockToPool( const ResPool &pool )
Modified: trunk/libzypp/zypp/OnMediaLocation.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/OnMediaLocation.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/OnMediaLocation.h (original)
+++ trunk/libzypp/zypp/OnMediaLocation.h Mon Mar 17 18:16:23 2008
@@ -87,13 +87,6 @@
{ _openchecksum = val_r; return *this; }
public:
- /** \deprecated use \ref setLocation or \ref changeMedianr */
- ZYPP_DEPRECATED OnMediaLocation & xsetMedianr( unsigned val_r )
- { return changeMedianr( val_r ); }
- /** \deprecated use \ref setLocation or \ref changeFilename */
- ZYPP_DEPRECATED OnMediaLocation & xsetFilename( const Pathname & val_r )
- { return changeFilename( val_r ); }
-
/** Individual manipulation of \c medianr.
* Using \ref setLocation is prefered.
*/
Modified: trunk/libzypp/zypp/ResFilters.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResFilters.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResFilters.h (original)
+++ trunk/libzypp/zypp/ResFilters.h Mon Mar 17 18:16:23 2008
@@ -16,11 +16,9 @@
#include "zypp/base/Functional.h"
#include "zypp/Resolvable.h"
-#include "zypp/CapFilters.h"
#include "zypp/PoolItem.h"
#include "zypp/Repository.h"
-#include "zypp/CapAndItem.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -203,7 +201,7 @@
std::string _alias;
};
-
+
/** Select ResObject by Edition using \a _Compare functor.
*
* Selects ResObject if <tt>_Compare( ResObject->edition(), _edition )</tt>
@@ -343,97 +341,6 @@
}
};
-
-
- ///////////////////////////////////////////////////////////////////
-
- /** Select ResObject if at least one Capability with
- * index \a index_r was found in dependency \a depType_r.
- */
- struct ByCapabilityIndex
- {
- bool operator()( const CapAndItem & /*cai*/ ) const
- {
- return true; // its all in the PoolImpl !
- }
- };
-
-
- /** Select ResObject if at least one Capability with
- * index \a index_r was found in dependency \a depType_r.
- */
- struct ByCapMatch
- {
- bool operator()( const CapAndItem & cai ) const
- {
- return cai.cap.matches( _cap ) == CapMatch::yes;
- }
- ByCapMatch( const Capability & cap_r )
- : _cap( cap_r )
- {}
- Capability _cap;
- };
-
-
- /** Select PoolItem by uninstalled. */
- struct ByCaIUninstalled
- {
- bool operator()( const CapAndItem & cai ) const
- {
- return cai.item.status().isUninstalled();
- }
- };
-
- /** Select PoolItem by installed. */
- struct ByCaIInstalled
- {
- bool operator()( const CapAndItem & cai ) const
- {
- return cai.item.status().isInstalled();
- }
- };
-
- /** Select PoolItem by transact. */
- struct ByCaITransact
- {
- bool operator()( const CapAndItem & cai ) const
- {
- return cai.item.status().transacts();
- }
- };
-
- /** Select PoolItem by not transact. */
- struct ByCaINotTransact
- {
- bool operator()( const CapAndItem & cai ) const
- {
- return !(cai.item.status().transacts());
- }
- };
-
-
- /** Select CapAndItem by kind. */
- struct ByCaIKind
- {
- ByCaIKind( const ResObject::Kind & kind_r )
- : _kind( kind_r )
- {}
-
- bool operator()( const CapAndItem & cai ) const
- {
- return cai.item->kind() == _kind;
- }
-
- ResObject::Kind _kind;
- };
-
- /** */
- template<class _Res>
- inline ByCaIKind byCaIKind()
- { return ByCaIKind( ResTraits<_Res>::kind ); }
-
- ///////////////////////////////////////////////////////////////////
-
//@}
/////////////////////////////////////////////////////////////////
} // namespace resfilter
Modified: trunk/libzypp/zypp/ResPool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResPool.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResPool.cc (original)
+++ trunk/libzypp/zypp/ResPool.cc Mon Mar 17 18:16:23 2008
@@ -66,13 +66,6 @@
PoolItem ResPool::find( const sat::Solvable & slv_r ) const
{ return _pimpl->find( slv_r ); }
- ResPool::byCapabilityIndex_iterator ResPool::byCapabilityIndexBegin( const std::string & index_r, Dep depType_r ) const
- { return _pimpl->_caphashfake.begin(); }
-
- ResPool::byCapabilityIndex_iterator ResPool::byCapabilityIndexEnd( const std::string & index_r, Dep depType_r ) const
- { return _pimpl->_caphashfake.end(); }
-
-
ResPool::size_type ResPool::knownRepositoriesSize() const
{ return _pimpl->knownRepositories().size(); }
Modified: trunk/libzypp/zypp/ResPool.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResPool.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResPool.h (original)
+++ trunk/libzypp/zypp/ResPool.h Mon Mar 17 18:16:23 2008
@@ -54,9 +54,8 @@
typedef pool::PoolTraits::size_type size_type;
typedef pool::PoolTraits::const_iterator const_iterator;
- typedef pool::PoolTraits::byCapabilityIndex_iterator byCapabilityIndex_iterator;
- typedef pool::PoolTraits::AdditionalCapabilities AdditionalCapabilities;
- typedef pool::PoolTraits::repository_iterator repository_iterator;
+ typedef pool::PoolTraits::AdditionalCapabilities AdditionalCapabilities;
+ typedef pool::PoolTraits::repository_iterator repository_iterator;
public:
/** Singleton ctor. */
@@ -201,34 +200,19 @@
//@}
public:
- /** \name Iterate through all ResObjects with a certain name (all kinds).
- * \deprecated Instead of iterating byName and filter byKind use ByIdent iterator.
- */
+ /** \name Iterate through all ResObjects with a certain name (all kinds). */
//@{
typedef zypp::resfilter::ByName ByName;
typedef filter_iterator byName_iterator;
- byName_iterator ZYPP_DEPRECATED byNameBegin( const std::string & name_r ) const
+ byName_iterator byNameBegin( const std::string & name_r ) const
{ return make_filter_begin( ByName(name_r), *this ); }
- byName_iterator ZYPP_DEPRECATED byNameEnd( const std::string & name_r ) const
+ byName_iterator byNameEnd( const std::string & name_r ) const
{ return make_filter_end( ByName(name_r), *this ); }
//@}
public:
- /** \name Iterate through all ResObjects which have at least
- * one Capability with index \a index_r in dependency \a depType_r.
- *
- * \deprecated If you're looking for providers of a certain capability
- * use \ref sat::WhatProvides. That's currently the only index provided.
- */
- //@{
- byCapabilityIndex_iterator ZYPP_DEPRECATED byCapabilityIndexBegin( const std::string & index_r, Dep depType_r ) const;
-
- byCapabilityIndex_iterator ZYPP_DEPRECATED byCapabilityIndexEnd( const std::string & index_r, Dep depType_r ) const;
- //@}
-
- public:
/** \name Iterate through all Repositories that contribute ResObjects.
*/
//@{
Modified: trunk/libzypp/zypp/ZConfig.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ZConfig.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/ZConfig.h (original)
+++ trunk/libzypp/zypp/ZConfig.h Mon Mar 17 18:16:23 2008
@@ -66,10 +66,6 @@
void resetSystemArchitecture()
{ setSystemArchitecture( defaultSystemArchitecture() ); }
- /** use setSystemArchitecture */
- ZYPP_DEPRECATED void overrideSystemArchitecture( const Arch & arch_r )
- { setSystemArchitecture( arch_r ); }
-
public:
/** The autodetected prefered locale for translated texts.
*/
Modified: trunk/libzypp/zypp/pool/PoolImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/PoolImpl.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/pool/PoolImpl.cc (original)
+++ trunk/libzypp/zypp/pool/PoolImpl.cc Mon Mar 17 18:16:23 2008
@@ -13,11 +13,6 @@
#include "zypp/base/LogTools.h"
#include "zypp/pool/PoolImpl.h"
-#include "zypp/Package.h"
-#include "zypp/VendorAttr.h"
-
-#include "zypp/sat/Pool.h"
-#include "zypp/Repository.h"
using std::endl;
@@ -25,11 +20,6 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
- std::ostream & operator<<( std::ostream & str, const CapAndItem & obj )
- {
- return str << "{" << obj.cap << ", " << obj.item << "}";
- }
-
///////////////////////////////////////////////////////////////////
namespace pool
{ /////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/pool/PoolImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/PoolImpl.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/pool/PoolImpl.h (original)
+++ trunk/libzypp/zypp/pool/PoolImpl.h Mon Mar 17 18:16:23 2008
@@ -278,10 +278,6 @@
mutable shared_ptr<ResPoolProxy> _poolProxy;
mutable scoped_ptr<KnownRepositories> _knownRepositoriesPtr;
-
- public:
- /** \bug FAKE capindex */
- const PoolTraits::CapItemContainerT _caphashfake;
};
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/pool/PoolTraits.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/PoolTraits.h?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/pool/PoolTraits.h (original)
+++ trunk/libzypp/zypp/pool/PoolTraits.h Mon Mar 17 18:16:23 2008
@@ -28,8 +28,6 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
- class CapAndItem;
-
///////////////////////////////////////////////////////////////////
namespace pool
{ /////////////////////////////////////////////////////////////////
@@ -141,24 +139,10 @@
typedef transform_iterator
byIdent_iterator;
-
/* list of known Repositories */
typedef std::list<Repository> RepoContainerT;
typedef RepoContainerT::const_iterator repository_iterator;
-
- // internal organization
- typedef std::listzypp::CapAndItem CapItemContainerT; // (why,who) pairs
- typedef std::mapstd::string,CapItemContainerT CapItemStoreT; // capability.index -> (why,who) pairs
- typedef std::map DepCapItemContainerT; // Dep -> (capability.index -> (why,who) pairs)
-
- typedef CapItemContainerT::iterator capitemiterator;
- typedef CapItemContainerT::const_iterator const_capitemiterator;
- typedef CapItemContainerT::size_type capitemsize_type;
- /** hashed by capability index */
- typedef const_capitemiterator byCapabilityIndex_iterator;
-
-
typedef PoolImpl Impl;
typedef shared_ptr<PoolImpl> Impl_Ptr;
typedef shared_ptr<const PoolImpl> Impl_constPtr;
Modified: trunk/libzypp/zypp/sat/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SATResolver.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/SATResolver.cc (original)
+++ trunk/libzypp/zypp/sat/SATResolver.cc Mon Mar 17 18:16:23 2008
@@ -30,7 +30,6 @@
#include "zypp/base/Algorithm.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/sat/SATResolver.h"
#include "zypp/sat/Pool.h"
#include "zypp/sat/WhatProvides.h"
Modified: trunk/libzypp/zypp/solver/detail/Helper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Helper.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Helper.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Helper.cc Mon Mar 17 18:16:23 2008
@@ -31,7 +31,6 @@
#include "zypp/base/Algorithm.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/RepoInfo.h"
using namespace std;
Modified: trunk/libzypp/zypp/solver/detail/InstallOrder.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/InstallOrder.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/InstallOrder.cc (original)
+++ trunk/libzypp/zypp/solver/detail/InstallOrder.cc Mon Mar 17 18:16:23 2008
@@ -34,7 +34,6 @@
#include "zypp/ResFilters.h"
#include "zypp/ResStatus.h"
-#include "zypp/CapAndItem.h"
#include "zypp/NameKindProxy.h"
#include "zypp/sat/SATResolver.h"
#include "zypp/sat/Pool.h"
Modified: trunk/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc (original)
+++ trunk/libzypp/zypp/solver/detail/ProblemSolutionUnlock.cc Mon Mar 17 18:16:23 2008
@@ -29,7 +29,6 @@
#include "zypp/base/Algorithm.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/solver/detail/ProblemSolutionUnlock.h"
using namespace std;
Modified: trunk/libzypp/zypp/solver/detail/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.cc Mon Mar 17 18:16:23 2008
@@ -31,7 +31,6 @@
#include "zypp/base/Algorithm.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/sat/Pool.h"
#include "zypp/sat/Solvable.h"
#include "zypp/sat/SATResolver.h"
Modified: trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc (original)
+++ trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc Mon Mar 17 18:16:23 2008
@@ -46,7 +46,6 @@
#include "zypp/ResPool.h"
#include "zypp/ResStatus.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
#include "zypp/Capability.h"
#include "zypp/VendorAttr.h"
#include "zypp/Package.h"
Modified: trunk/libzypp/zypp/solver/detail/Resolver_problems.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver_problems.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver_problems.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver_problems.cc Mon Mar 17 18:16:23 2008
@@ -34,7 +34,6 @@
#include "zypp/base/Algorithm.h"
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
-#include "zypp/CapFilters.h"
/////////////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/target/TargetImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/TargetImpl.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/TargetImpl.cc (original)
+++ trunk/libzypp/zypp/target/TargetImpl.cc Mon Mar 17 18:16:23 2008
@@ -31,7 +31,6 @@
#include "zypp/ExternalProgram.h"
#include "zypp/Repository.h"
-#include "zypp/CapMatchHelper.h"
#include "zypp/ResFilters.h"
#include "zypp/target/CommitLog.h"
#include "zypp/target/TargetImpl.h"
@@ -137,63 +136,6 @@
} // namespace
///////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace
- { /////////////////////////////////////////////////////////////////
-
- /** Helper removing obsoleted non-Package from store. */
- struct StorageRemoveObsoleted
- {
- StorageRemoveObsoleted(const PoolItem & byPoolitem_r )
- : _byPoolitem( byPoolitem_r )
- {}
-
- bool operator()( const PoolItem & poolitem_r ) const
- {
- if ( ! poolitem_r.status().isInstalled() )
- return true;
-
- if ( isKind<Package>(poolitem_r.resolvable()) )
- {
- ERR << "Ignore unsupported Package/non-Package obsolete: "
- << _byPoolitem << " obsoletes " << poolitem_r << endl;
- return true;
- }
-
- try
- {
- // delete poolitem_r.resolvable()
- MIL<< "Obsoleted: " << poolitem_r << " (by " << _byPoolitem << ")" << endl;
- }
- catch ( Exception & excpt_r )
- {
- ZYPP_CAUGHT( excpt_r );
- WAR << "Failed obsolete: " << poolitem_r << " (by " << _byPoolitem << ")" << endl;
- }
-
- return true;
- }
-
- private:
- const PoolItem _byPoolitem;
- };
-
- /** Helper processing non-Package obsoletes.
- *
- * Scan \a pool_r for items obsoleted \a byPoolitem_r and remove them from
- * \a storage_r.
- */
- void obsoleteMatchesFromStorage( const ResPool & pool_r,
- const PoolItem & byPoolitem_r )
- {
- forEachPoolItemMatchedBy( pool_r, byPoolitem_r, Dep::OBSOLETES,
- OncePerPoolItem( StorageRemoveObsoleted( byPoolitem_r ) ) );
- }
-
- /////////////////////////////////////////////////////////////////
- } // namespace
- ///////////////////////////////////////////////////////////////////
-
/** Helper for PackageProvider queries during commit. */
struct QueryInstalledEditionHelper
{
@@ -641,9 +583,6 @@
{
if (it->status().isToBeInstalled())
{
- // Process OBSOLETES and remove them from store.
- obsoleteMatchesFromStorage( pool_r, *it );
-
bool success = false;
try
{
Modified: trunk/libzypp/zypp/ui/PatternExpander.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/PatternExpander.cc?rev=9183&r1=9182&r2=9183&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/PatternExpander.cc (original)
+++ trunk/libzypp/zypp/ui/PatternExpander.cc Mon Mar 17 18:16:23 2008
@@ -17,7 +17,6 @@
#include "zypp/base/Algorithm.h"
#include "zypp/base/Function.h"
#include "zypp/ResPool.h"
-#include "zypp/CapMatchHelper.h"
using std::endl;
@@ -91,16 +90,11 @@
/** Store Patterns matching an \c Includes capability in \c _patternMap. */
void expandInclude( const Capability & include_r )
{
- forEachMatchIn( _pool, Dep::PROVIDES, include_r,
- bind( &Impl::storeIncludeMatch, this, _1 ) );
- }
-
- /** Store a Pattern in \c _patternMap. */
- bool storeIncludeMatch( const CapAndItem & capitem_r )
- {
- _patternMap[asKind<Pattern>(capitem_r.item)];
- //DBG << mapEntry(*_patternMap.find(asKind<Pattern>(capitem_r.item))) << endl;
- return true;
+ sat::WhatProvides w( include_r );
+ for_( it, w.begin(), w.end() )
+ {
+ _patternMap[asKind<Pattern>(PoolItem(*it))];
+ }
}
private:
@@ -134,19 +128,17 @@
/** Return true if Capability \c extends_r is provided by Pattern. */
bool providedBy( const Pattern::constPtr & pat_r, const Capability & extends_r )
{
- std::string index( extends_r.index() );
- return( std::find_if( _pool.byCapabilityIndexBegin( index, Dep::PROVIDES ),
- _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ),
- bind( &Impl::providedByFilter, this, pat_r, extends_r, _1 ) )
- != _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ) );
- }
+ if ( !pat_r )
+ return false;
- /** Return true if \c capitem_r refers to \c pat_r and matches \c extends_r. */
- bool providedByFilter( const Pattern::constPtr & pat_r, const Capability & extends_r,
- const CapAndItem & capitem_r ) const
- {
- return( capitem_r.item == pat_r
- && extends_r.matches( capitem_r.cap ) == CapMatch::yes );
+ sat::Solvable pat( pat_r->satSolvable() );
+ sat::WhatProvides w( extends_r );
+ for_( it, w.begin(), w.end() )
+ {
+ if ( pat == *it )
+ return true;
+ }
+ return false;
}
private:
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org