Author: dmacvicar
Date: Thu Sep 11 16:50:27 2008
New Revision: 11017
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11017&view=rev
Log:
repository keys work
Modified:
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/Repository.cc
trunk/libzypp/zypp/Repository.h
trunk/libzypp/zypp/sat/SolvAttr.cc
trunk/libzypp/zypp/sat/SolvAttr.h
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11017&r1=11016&r2=11017&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Thu Sep 11 16:50:27 2008
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Thu Sep 11 16:01:57 CEST 2008 - dmacvicar@suse.de
+
+- add Repostiroy::updateKeys and
+ Repository::providesUpdatesForKey(string) for repo and
+ product matching
+- Provide Repository::isUpdateRepo
+
+-------------------------------------------------------------------
Thu Sep 11 14:41:28 CEST 2008 - ma@suse.de
- Fix evaluation of vendor support flags.
Modified: trunk/libzypp/zypp/Repository.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.cc?rev=11017&r1=11016&r2=11017&view=diff
==============================================================================
--- trunk/libzypp/zypp/Repository.cc (original)
+++ trunk/libzypp/zypp/Repository.cc Thu Sep 11 16:50:27 2008
@@ -123,7 +123,6 @@
return Date();
}
-
bool Repository::maybeOutdated() const
{
// system repo is not mirrored
@@ -138,7 +137,21 @@
return suggestedExpirationTimestamp() < Date::now();
}
+
+ Repository::UpdateKeys Repository::updateKeys() const
+ { return UpdateKeys( sat::SolvAttr::repositoryUpdates, *this ); }
+
+ bool Repository::providesUpdatesForKey( const std::string &key ) const
+ {
+ UpdateKeys keys(updateKeys());
+ return ( keys.find(key) != keys.end() );
+ }
+ bool Repository::isUpdateRepo() const
+ {
+ return ( ! updateKeys().empty() );
+ }
+
bool Repository::solvablesEmpty() const
{
NO_REPOSITORY_RETURN( true );
Modified: trunk/libzypp/zypp/Repository.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.h?rev=11017&r1=11016&r2=11017&view=diff
==============================================================================
--- trunk/libzypp/zypp/Repository.h (original)
+++ trunk/libzypp/zypp/Repository.h Thu Sep 11 16:50:27 2008
@@ -24,6 +24,12 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
+ namespace sat
+ {
+ template