Author: mlandres
Date: Thu Oct 9 01:03:40 2008
New Revision: 11270
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11270&view=rev
Log:
- Add required copy-ctor and assignment operator to WhatProvides.
(bnc #433087)
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/NewPool.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/sat/WhatProvides.h
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=11270&r1=11269&r2=11270&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Thu Oct 9 01:03:40 2008
@@ -59,9 +59,9 @@
# changes file. See './mkChangelog -h' for help.
#
SET(LIBZYPP_MAJOR "5")
-SET(LIBZYPP_COMPATMINOR "13")
-SET(LIBZYPP_MINOR "15")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_COMPATMINOR "16")
+SET(LIBZYPP_MINOR "16")
+SET(LIBZYPP_PATCH "0")
#
# LAST RELEASED: 5.15.1 (13)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
Modified: trunk/libzypp/devel/devel.ma/NewPool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/NewPool.cc?rev=11270&r1=11269&r2=11270&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/NewPool.cc (original)
+++ trunk/libzypp/devel/devel.ma/NewPool.cc Thu Oct 9 01:03:40 2008
@@ -602,6 +602,70 @@
if ( 0 )
{
+ CapabilitySet caps;
+ caps.insert( Capability("pattern:multimedia") );
+ caps.insert( Capability("pattern:gnome_basis") );
+ caps.insert( Capability("pattern:imaging") );
+ caps.insert( Capability("pattern:office") );
+ caps.insert( Capability("pattern:non_oss") );
+ caps.insert( Capability("pattern:non_oss_java") );
+ caps.insert( Capability("pattern:gnome_admin") );
+ caps.insert( Capability("pattern:gnome_internet") );
+ caps.insert( Capability("xsane") );
+ caps.insert( Capability("pattern:gnome_utilities") );
+ caps.insert( Capability("pattern:games") );
+ caps.insert( Capability("pattern:xgl") );
+ INT << caps << endl;
+
+ sat::WhatProvides prv1( Capability("pattern:multimedia") );
+ DBG << (prv1.begin()==prv1.begin()) << endl;
+
+ sat::WhatProvides prv( caps );
+ DBG << (prv.begin()==prv.begin()) << endl;
+// MIL << prv.empty() << endl;
+// MIL << prv.size() << endl;
+// for_( it, prv.begin(), prv.end() )
+// {
+// INT << *it << endl;
+// }
+// MIL << ( prv.begin() == prv.end() ) << endl;
+// // MIL << ( prv.begin() == prv.begin() ) << endl;
+// MIL << ( prv.end() == prv.end() ) << endl;
+
+ sat::WhatProvides::const_iterator i1( prv.begin() );
+ sat::WhatProvides::const_iterator i2( prv.begin() );
+ sat::WhatProvides::const_iterator i3( i2 );
+ DBG << (i1==i1) << endl;
+ DBG << (i1==i2) << endl;
+ DBG << (i1==i3) << endl;
+ DBG << (i2==i2) << endl;
+ DBG << (i1==i3) << endl;
+ DBG << (i3==i3) << endl;
+
+ dumpRange( SEC, make_filter_begin( filter::byKind<Package>(), prv ),
+ make_filter_end( filter::byKind<Package>(), prv ) ) << endl;
+
+ }
+
+ if ( 1 )
+ {
+ PoolItem pi ( getPi<Pattern>("gnome") );
+ MIL << pi << endl;
+ Pattern::constPtr p( pi->asKind<Pattern>() );
+ if ( p )
+ {
+ p->depends();
+ MIL << p->depends() << endl;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////
+ INT << "===[END]============================================" << endl << endl;
+ zypp::base::LogControl::instance().logNothing();
+ return 0;
+
+ if ( 0 )
+ {
PoolItem pi ( getPi<Package>("amarok") );
MIL << pi << endl;
if ( pi )
@@ -620,72 +684,10 @@
make_filter_beginresfilter::ByTransact(pool),
make_filter_endresfilter::ByTransact(pool) ) << endl;
- //////////////////////////////////////////////////////////////////
- INT << "===[END]============================================" << endl << endl;
- zypp::base::LogControl::instance().logNothing();
- return 0;
- for_( it, pool.byKindBegin<Product>(), pool.byKindEnd<Product>() )
- {
- MIL << *it << endl;
- DBG << (*it)->provides() << endl;
- }
-
- sat::WhatProvides prv( Capability("product()") );
- SEC << prv << endl;
- for_( it, prv.begin(), prv.end() )
- {
-
- MIL << *it << endl;
- MIL << it->provides() << endl;
- }
-
- Capability cap;
-
- cap = Capability( "sles-release" );
- prv = sat::WhatProvides( cap );
- MIL << cap << ": " << prv << endl;
-
- cap = Capability( "sles-release == 11" );
- prv = sat::WhatProvides( cap );
- MIL << cap << ": " << prv << endl;
-
-
-// PoolItem pi ( getPi<Package>("sles-release", Edition("11.0") ) );
-
//////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl << endl;
zypp::base::LogControl::instance().logNothing();
return 0;
-
-
- //SEC << zypp::getZYpp()->diskUsage() << endl;
-
- //vdumpPoolStats( USR << "Pool:"<< endl, pool.begin(), pool.end() ) << endl;
-
- sat::WhatProvides prodcap( Capability("product()") );
- dumpRange( WAR << "Product ", pool.byKindBegin<Product>(), pool.byKindEnd<Product>() ) << endl;
- dumpRange( WAR << "ProdPac " , prodcap.poolItemBegin(), prodcap.poolItemEnd() ) << endl;
-
- prodcap.poolItemBegin()->status().setTransact( true, ResStatus::APPL_LOW );
- dumpRange( WAR << "Product ", pool.byKindBegin<Product>(), pool.byKindEnd<Product>() ) << endl;
- dumpRange( WAR << "ProdPac " , prodcap.poolItemBegin(), prodcap.poolItemEnd() ) << endl;
-
- pool.byKindBegin<Product>()->status().setTransact( true, ResStatus::USER );
- dumpRange( WAR << "Product ", pool.byKindBegin<Product>(), pool.byKindEnd<Product>() ) << endl;
- dumpRange( WAR << "ProdPac " , prodcap.poolItemBegin(), prodcap.poolItemEnd() ) << endl;
-
- prodcap.poolItemBegin()->status().setLock( true, ResStatus::USER );
- dumpRange( WAR << "Product ", pool.byKindBegin<Product>(), pool.byKindEnd<Product>() ) << endl;
- dumpRange( WAR << "ProdPac " , prodcap.poolItemBegin(), prodcap.poolItemEnd() ) << endl;
-
-
-
- //std::for_each( pool.begin(), pool.end(), Xprint() );
-
- ///////////////////////////////////////////////////////////////////
- INT << "===[END]============================================" << endl << endl;
- zypp::base::LogControl::instance().logNothing();
- return 0;
}
catch ( const Exception & exp )
{
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11270&r1=11269&r2=11270&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Thu Oct 9 01:03:40 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Oct 9 00:58:37 CEST 2008 - ma@suse.de
+
+- Add required copy-ctor and assignment operator to WhatProvides.
+ (bnc #433087)
+- revision 11270
+
+-------------------------------------------------------------------
Wed Oct 8 16:24:25 CEST 2008 - jkupec@suse.cz
- detect and use unused loop device for mounting ISO images
Modified: trunk/libzypp/zypp/sat/WhatProvides.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/WhatProvides.h?rev=11270&r1=11269&r2=11270&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/WhatProvides.h (original)
+++ trunk/libzypp/zypp/sat/WhatProvides.h Thu Oct 9 01:03:40 2008
@@ -157,18 +157,38 @@
{}
/** Ctor with pointer to 1st elemment of an array.
- * Use otherwise unused base as pointer for _baseRef. */
+ * Use otherwise unused base as pointer for _baseRef.
+ */
explicit WhatProvidesIterator( const detail::IdType *const base_r, unsigned offset_r = 0 )
: iterator_adaptor_( base_r ), _baseRef( base_r ? &base_reference() : 0 ), _offset( offset_r )
{}
/** Ctor with pointer to pointer to 1st elemment of an array.
- * Required for arrays that might be relocated whlite iterating (
- */
+ * Required for arrays that might be relocated while iterating.
+ */
explicit WhatProvidesIterator( const detail::IdType *const* baseRef_r, unsigned offset_r )
: iterator_adaptor_( 0 ), _baseRef( baseRef_r ), _offset( offset_r )
{}
+ /** Copy-ctor required to keep _baseRef adjusted. */
+ WhatProvidesIterator( const WhatProvidesIterator & rhs )
+ : iterator_adaptor_( rhs.base_reference() )
+ , _baseRef( base_reference() ? &base_reference() : 0 )
+ , _offset( rhs._offset )
+ {}
+
+ /** Assignment operator required to keep _baseRef adjusted. */
+ WhatProvidesIterator & operator=( const WhatProvidesIterator & rhs )
+ {
+ if ( this != &rhs ) // no self assign
+ {
+ base_reference() = rhs.base_reference();
+ _baseRef = ( base_reference() ? &base_reference() : 0 );
+ _offset = rhs._offset;
+ }
+ return *this;
+ }
+
private:
friend class boost::iterator_core_access;
@@ -179,9 +199,14 @@
bool equal( const boost::iterator_adaptor