- adapted to Service change
authorJan Kupec <jkupec@suse.cz>
Wed, 30 Jul 2008 12:13:45 +0000 (12:13 +0000)
committerJan Kupec <jkupec@suse.cz>
Wed, 30 Jul 2008 12:13:45 +0000 (12:13 +0000)
src/Zypper.cc
src/repos.cc
src/repos.h
src/utils/misc.h
zypper.spec.cmake

index ae5fd98..fa49da9 100644 (file)
@@ -2168,11 +2168,11 @@ void Zypper::doCommand()
 
     warn_if_zmd();
 
-    set<Service, ServiceAliasComparator> to_remove;
+    set<ServiceInfo, ServiceAliasComparator> to_remove;
     for (vector<string>::const_iterator it = _arguments.begin();
         it != _arguments.end(); ++it)
     {
-      Service s;
+      ServiceInfo s;
       if (match_service(*this, *it, &s))
       {
         to_remove.insert(s);
index 5df8e8a..192f4ba 100644 (file)
@@ -1757,7 +1757,7 @@ void modify_repo(Zypper & zypper, const string & alias)
 // ---------------------------------------------------------------------------
 
 static void print_service_list(Zypper & zypper,
-                               const list<Service> & services)
+                               const list<ServiceInfo> & services)
 {
   Table tbl;
   bool all = zypper.cOpts().count("details");
@@ -1785,10 +1785,10 @@ static void print_service_list(Zypper & zypper,
 
   int i = 1;
 
-  for (list<Service>::const_iterator it = services.begin();
+  for (list<ServiceInfo>::const_iterator it = services.begin();
        it != services.end(); ++it)
   {
-    Service service = *it;
+    ServiceInfo service = *it;
     TableRow tr(all ? 8 : showprio || showuri ? 7 : 6);
 
     // number
@@ -1859,7 +1859,7 @@ static void print_service_list(Zypper & zypper,
 void list_services(Zypper & zypper)
 {
   RepoManager manager(zypper.globalOpts().rm_options);
-  list<Service> services;
+  list<ServiceInfo> services;
 
   try
   {
@@ -1920,7 +1920,7 @@ void list_services(Zypper & zypper)
 
 // ---------------------------------------------------------------------------
 
-void add_service(Zypper & zypper, const Service & service)
+void add_service(Zypper & zypper, const ServiceInfo & service)
 {
   RepoManager manager(zypper.globalOpts().rm_options);
 
@@ -1961,7 +1961,7 @@ void add_service_by_url( Zypper & zypper,
   MIL << "going to add service by url (alias=" << alias << ", url=" << url
       << ")" << endl;
 
-  Service service;
+  ServiceInfo service;
 
   //! \todo what about service type? compare to rug. idea: do addrepo if type is specified and is not NU.
   //if ( ! type.empty() )
@@ -1982,7 +1982,7 @@ void add_service_by_url( Zypper & zypper,
 
 // ---------------------------------------------------------------------------
 
-void remove_service(Zypper & zypper, const Service & service)
+void remove_service(Zypper & zypper, const ServiceInfo & service)
 {
   RepoManager manager(zypper.globalOpts().rm_options);
 
@@ -2000,7 +2000,7 @@ void refresh_services(Zypper & zypper)
 
   RepoManager manager(zypper.globalOpts().rm_options);
 
-  list<Service> services;
+  list<ServiceInfo> services;
   try
   {
     services.insert(services.end(), manager.serviceBegin(), manager.serviceEnd());
@@ -2015,7 +2015,7 @@ void refresh_services(Zypper & zypper)
 
   for_(sit, services.begin(), services.end())
   {
-    Service s = *sit;
+    ServiceInfo s = *sit;
 
     try
     {
@@ -2038,15 +2038,15 @@ void refresh_services(Zypper & zypper)
 
 // ---------------------------------------------------------------------------
 
-bool match_service(Zypper & zypper, string str, Service * service)
+bool match_service(Zypper & zypper, string str, ServiceInfo * service)
 {
   RepoManager manager(zypper.globalOpts().rm_options);
-  list<Service> known;
+  list<ServiceInfo> known;
   known.insert(known.end(), manager.serviceBegin(), manager.serviceEnd());
   bool found = false;
 
   unsigned int number = 1; // repo number
-  for (list<Service>::const_iterator known_it = known.begin();
+  for (list<ServiceInfo>::const_iterator known_it = known.begin();
       known_it != known.end(); ++known_it, ++number)
   {
     unsigned int tmp = 0;
index 6200592..a363cdc 100644 (file)
@@ -11,7 +11,7 @@
 #include "zypp/TriBool.h"
 #include "zypp/Url.h"
 #include "zypp/RepoInfo.h"
-#include "zypp/Service.h"
+#include "zypp/ServiceInfo.h"
 
 #include "Zypper.h"
 
@@ -139,18 +139,18 @@ void modify_repos_by_option( Zypper & zypper );
 
 void list_services(Zypper & zypper);
 
-void add_service(Zypper & zypper, const zypp::Service & service);
+void add_service(Zypper & zypper, const zypp::ServiceInfo & service);
 
 void add_service_by_url( Zypper & zypper,
                          const zypp::Url & url, const std::string & alias,
                          const std::string & type,
                          boost::tribool enabled = boost::indeterminate);
 
-void remove_service(Zypper & zypper, const zypp::Service & service);
+void remove_service(Zypper & zypper, const zypp::ServiceInfo & service);
 
 void refresh_services(Zypper & zypper);
 
-bool match_service(Zypper & zypper, std::string str, zypp::Service * service);
+bool match_service(Zypper & zypper, std::string str, zypp::ServiceInfo * service);
 
 /**
  * Initialize rpm database on target, if not already initialized. 
index f04774c..329e618 100644 (file)
@@ -15,7 +15,7 @@
 #include "zypp/Resolvable.h"
 #include "zypp/Pathname.h"
 #include "zypp/RepoInfo.h"
-#include "zypp/Service.h"
+#include "zypp/ServiceInfo.h"
 
 #include "Zypper.h"
 
@@ -82,7 +82,7 @@ class RepoInfoAliasComparator
 // comparator for Service set
 class ServiceAliasComparator
 {
-  public: bool operator()(const zypp::Service & a, const zypp::Service & b)
+  public: bool operator()(const zypp::ServiceInfo & a, const zypp::ServiceInfo & b)
   {
     return a.alias() < b.alias();
   }
index 5f03ca0..c0f9616 100644 (file)
@@ -11,7 +11,7 @@
 # norootforbuild
 
 Name:           @PACKAGE@
-BuildRequires:  libzypp-devel >= 4.21.2 boost-devel >= 1.33.1 gettext-devel >= 0.15 readline-devel >= 5.1
+BuildRequires:  libzypp-devel >= 5.4.0 boost-devel >= 1.33.1 gettext-devel >= 0.15 readline-devel >= 5.1
 BuildRequires:  gcc-c++ >= 4.1 cmake >= 2.4.6
 Requires:      procps
 Recommends:     logrotate cron