SET(LIBZYPP_MAJOR "5")
SET(LIBZYPP_COMPATMINOR "4")
SET(LIBZYPP_MINOR "4")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
#
# LAST RELEASED: 5.4.0 (4)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
+ // ResPool pool( ResPool::instance() );
+
+ // Iterate all repositories loaded to the pool
+ for_( it, pool.knownRepositoriesBegin(), pool.knownRepositoriesEnd() )
+ {
+ MIL << *it << endl;
+ }
+
+ // some specific repo
+ Repository myRepo( *pool.knownRepositoriesBegin() );
+
+ // Iterate all packages named "amarok" (from all repos)
+ for_( it, pool.byIdentBegin( ResKind::package, "amarok" ), pool.byIdentEnd( ResKind::package, "amarok" ) )
+ {
+ MIL << "Check: " << *it << endl;
+ if ( (*it)->repository() == myRepo )
+ {
+ MIL << " Found: " << (*it)->name() << endl;
+ MIL << " Version: " << (*it)->edition() << endl;
+ MIL << " Repository: " << (*it)->repository() << endl;
+ }
+
+ }
+
+
+
+ ///////////////////////////////////////////////////////////////////
+ INT << "===[END]============================================" << endl << endl;
+ zypp::base::LogControl::instance().logNothing();
+ return 0;
+
+
ui::Selectable::Ptr item( ui::Selectable::get( "amarok" ) );
item->setUpToDate();
SEC << dump(item) << endl;
-------------------------------------------------------------------
+Wed Aug 13 15:12:45 CEST 2008 - ma@suse.de
+
+- Add ResPool::reposFind to get repositories by alias.
+- revision 10835
+
+-------------------------------------------------------------------
Tue Aug 12 19:37:36 CEST 2008 - ma@suse.de
- Advise rpmdb2solv to parse the product database.
ResPool::repository_iterator ResPool::knownRepositoriesEnd() const
{ return _pimpl->knownRepositoriesEnd(); }
+ Repository ResPool::reposFind( const std::string & alias_r ) const
+ { return _pimpl->reposFind( alias_r ); }
bool ResPool::autoSoftLocksEmpty() const
{ return _pimpl->autoSoftLocks().empty(); }
repository_iterator knownRepositoriesBegin() const;
repository_iterator knownRepositoriesEnd() const;
+
+ /** Find a \ref Repository named \c alias_r.
+ * Returns \ref Repository::norepository if there is no such \ref Repository.
+ */
+ Repository reposFind( const std::string & alias_r ) const;
//@}
public:
repository_iterator knownRepositoriesEnd() const
{ checkSerial(); return satpool().reposEnd(); }
+ Repository reposFind( const std::string & alias_r ) const
+ { checkSerial(); return satpool().reposFind( alias_r ); }
+
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////