Adapt to changed satsolver dataiteratir API.
authorMichael Andres <ma@suse.de>
Mon, 20 Oct 2008 14:41:10 +0000 (14:41 +0000)
committerMichael Andres <ma@suse.de>
Mon, 20 Oct 2008 14:41:10 +0000 (14:41 +0000)
package/libzypp.changes
zypp/Patch.cc
zypp/PoolQuery.cc
zypp/RepoInfo.cc
zypp/RepoInfo.h
zypp/RepoManager.cc
zypp/RepoManager.h
zypp/Repository.cc
zypp/repo/DeltaCandidates.cc
zypp/repo/PackageDelta.cc
zypp/sat/LookupAttr.cc

index de60083..deba088 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Mon Oct 20 16:39:41 CEST 2008 - ma@suse.de
+
+- Adapt to changed satsolver dataiterator API.
+- revision 11418
+
+-------------------------------------------------------------------
 Fri Oct 17 18:31:47 CEST 2008 - ma@suse.de
 
 - Secure download of license file on repo refresh (bnc #372386)
index 527bb5b..730b79e 100644 (file)
@@ -117,6 +117,7 @@ namespace zypp
 
       ::Dataiterator di;
       ::dataiterator_init(&di
+          , sat::Pool::instance().get()
           , repository().get()                           // in this repo
           , sat::Solvable::id()                          // in metadata
               , UPDATE_COLLECTION, 0, 0 );
@@ -126,6 +127,7 @@ namespace zypp
           ::dataiterator_setpos( &di );
           ::Dataiterator di2;
           ::dataiterator_init(&di2
+              , sat::Pool::instance().get()
               , repository().get()                           // in this repo
               , SOLVID_POS                                   // in metadata
                   ,0,0,0 );
index 1d179ed..ef9aa07 100644 (file)
@@ -49,7 +49,7 @@ namespace zypp
   {
   public:
     Impl()
-      : _flags( SEARCH_ALL_REPOS | SEARCH_NOCASE | SEARCH_SUBSTRING | SEARCH_SKIP_KIND )
+      : _flags( SEARCH_NOCASE | SEARCH_SUBSTRING | SEARCH_SKIP_KIND )
       , _status_flags(ALL)
       , _match_word(false)
       , _require_all(false)
@@ -269,12 +269,7 @@ attremptycheckend:
       }
     }
 
-    // tell the Dataiterator to search only in one repo if only one specified
-    if (_repos.size() == 1)
-      _cflags &= ~SEARCH_ALL_REPOS;
-
     _compiled = true;
-
     DBG << asString() << endl;
   }
 
@@ -391,7 +386,7 @@ attremptycheckend:
 
     // if only one repository has been specified, find it in the pool
     Repository repo;
-    if (!(_cflags & SEARCH_ALL_REPOS) && _repos.size() == 1)
+    if ( _repos.size() == 1 )
     {
       string theone = *_repos.begin();
       repo = pool.reposFind(theone);
@@ -402,9 +397,6 @@ attremptycheckend:
       }
     }
 
-    if ((_cflags & SEARCH_ALL_REPOS) || repo == Repository::noRepository)
-      repo = *pool.reposBegin();
-
     DBG << "_cflags:" << _cflags << endl;
 
     scoped_ptr< ::_Dataiterator> _rdit( new ::Dataiterator );
@@ -415,7 +407,8 @@ attremptycheckend:
     if (_rcattrs.empty())
     {
       ::dataiterator_init(_rdit.get(),
-        repo.get(),                                  // either the first repo or the repo to search
+        pool.get(),
+        repo.get(),                                  // either NULL or the repo to search
         0,                                           // search all solvables
         0,                                           // attribute id - only if 1 attr key specified
         _rcstrings.empty() ? 0 : _rcstrings.c_str(), // compiled search string
@@ -424,7 +417,8 @@ attremptycheckend:
     else if (_rcattrs.size() == 1)
     {
       ::dataiterator_init(_rdit.get(),
-        repo.get(),                                  // either the first repo or the repo to search
+        pool.get(),
+        repo.get(),                                  // either NULL or the repo to search
         0,                                           // search all solvables
         _rcattrs.begin()->first.id(),                // keyname - attribute id - only if 1 attr key specified
         _rcstrings.empty() ? 0 : _rcstrings.c_str(), // compiled search string
@@ -433,7 +427,8 @@ attremptycheckend:
     else
     {
       ::dataiterator_init(_rdit.get(),
-        repo.get(),                                  // either the first repo or the repo to search
+        pool.get(),
+        repo.get(),                                  // either NULL or the repo to search
         0, /*search all resolvables */
         0, /*keyname - if only 1 attr key specified, pass it here, otherwise do more magic */
         0, //qs.empty() ? 0 : qs.c_str(), /* create regex, pass it here */
@@ -478,7 +473,7 @@ attremptycheckend:
     o << "string match flags:" << endl;
     o << "* string/substring/glob/regex: " << (_cflags & SEARCH_STRINGMASK) << endl;
     o << "* SEARCH_NOCASE: " << ((_cflags & SEARCH_NOCASE) ? "yes" : "no") << endl;
-    o << "* SEARCH_ALL_REPOS: " << ((_cflags & SEARCH_ALL_REPOS) ? "yes" : "no") << endl;
+    o << "* SEARCH_ALL_REPOS: " << (_repos.empty() ? "yes" : "no") << endl;
     o << "status filter flags:" << _status_flags << endl;
     o << "version: "<< _op << " " << _edition.asString() << endl;
 
@@ -704,13 +699,13 @@ attremptycheckend:
               else
                 regex_p = _regex.get();
 #warning wrap matcher an use it
-              matches = ::dataiterator_match(base().get(), _flags, regex_p);
+              matches = ::dataiterator_match_obsolete(base().get(), _flags, regex_p);
             }
             else
             {
               const string & sstr =
                 _str.empty() ? ai->second : _str;
-              matches = ::dataiterator_match(base().get(), _flags, sstr.c_str());
+              matches = ::dataiterator_match_obsolete(base().get(), _flags, sstr.c_str());
             }
 
               // if (matches)
@@ -782,7 +777,6 @@ attremptycheckend:
       return;
     }
     _pimpl->_repos.insert(repoalias);
-    _pimpl->_flags &= ~SEARCH_ALL_REPOS;
   }
 
 
index 5034a78..df80a17 100644 (file)
@@ -266,6 +266,16 @@ namespace zypp
   }
 
 
+  bool RepoInfo::hasLicense() const
+  { return false; }
+
+  ManagedFile RepoInfo::getLicense( const Locale & lang_r )
+  { return ManagedFile(); }
+
+  LocaleSet RepoInfo::getLicenseLocales() const
+  { return LocaleSet(); }
+
+
   std::ostream & RepoInfo::dumpOn( std::ostream & str ) const
   {
     RepoInfoBase::dumpOn(str);
@@ -290,9 +300,6 @@ namespace zypp
     return str;
   }
 
-  std::ostream & RepoInfo::dumpRepoOn( std::ostream & str ) const
-  { return dumpAsIniOn(str); }
-
   std::ostream & RepoInfo::dumpAsIniOn( std::ostream & str ) const
   {
     RepoInfoBase::dumpAsIniOn(str);
index 276fe2d..474a7e3 100644 (file)
@@ -19,6 +19,8 @@
 #include "zypp/base/Deprecated.h"
 
 #include "zypp/Url.h"
+#include "zypp/Locale.h"
+#include "zypp/ManagedFile.h"
 #include "zypp/repo/RepoType.h"
 #include "zypp/repo/RepoVariables.h"
 
@@ -67,282 +69,277 @@ namespace zypp
     friend std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
 
     public:
-    RepoInfo();
-    virtual ~RepoInfo();
+      RepoInfo();
+      virtual ~RepoInfo();
 
-    /** Represents no Repository (one with an empty alias). */
-    static const RepoInfo noRepo;
+      /** Represents no Repository (one with an empty alias). */
+      static const RepoInfo noRepo;
 
-    /**
-     * Repository priority for solver.
-     * Some number between \c 1 (highest priority) and \c 99 (\ref defaultPriority).
-     */
-    unsigned priority() const;
-    /**
-     * The default priority (\c 99).
-     */
-    static unsigned defaultPriority();
-    /**
-     * Set repository priority for solver.
-     * A \c newval_r of \c 0 sets the default priority.
-     * \see \ref priority.
-     */
-    void setPriority( unsigned newval_r );
-
-    /**
-     * A Url under which the metadata are located, or a set of mirrors.
-     *
-     * This can't be empty in order the repository to be valid
-     * unless the download of the mirror list succeeds and it
-     * contains a valid url.
-     *
-     * \deprecated IMO superfluous as we provide begin/end iterator.
-     */
-    ZYPP_DEPRECATED std::set<Url> baseUrls() const;
-
-    /**
-     * \short Repository path
-     *
-     * Pathname relative to the base Url where the product/repository
-     * is located
-     *
-     * For medias containing more than one product, or repositories not
-     * located at the root of the media it is important to
-     * know the path of the media root relative to the product directory
-     * so a media verifier can be set for that media.
-     *
-     * It is not mandatory, and the default is /
-     *
-     * \note As a repository can have multiple Urls, the path is unique and
-     * the same for all Urls, so it is assumed all the Urls have the
-     * same media layout.
-     *
-     */
-    Pathname path() const;
-
-    /**
-     * Url of a file which contains a list of Urls
-     * If empty, the base url will be used.
-     */
-    Url mirrorListUrl() const;
-
-    typedef std::set<Url> url_set;
-    //typedef url_set::const_iterator urls_const_iterator;
-    typedef url_set::size_type      urls_size_type;
-    typedef transform_iterator<repo::RepoVariablesUrlReplacer, url_set::const_iterator> urls_const_iterator;
-
-    /**
-     * iterator that points at begin of repository urls
-     */
-    urls_const_iterator baseUrlsBegin() const;
-
-    /**
-     * iterator that points at end of repository urls
-     */
-    urls_const_iterator baseUrlsEnd() const;
-
-    /**
-     * number of repository urls
-     */
-    urls_size_type baseUrlsSize() const;
+    public:
+      /**
+       * The default priority (\c 99).
+       */
+      static unsigned defaultPriority();
+      /**
+       * Repository priority for solver.
+       * Some number between \c 1 (highest priority) and \c 99 (\ref defaultPriority).
+       */
+      unsigned priority() const;
+      /**
+       * Set repository priority for solver.
+       * A \c newval_r of \c 0 sets the default priority.
+       * \see \ref priority.
+       */
+      void setPriority( unsigned newval_r );
+
+      typedef std::set<Url>           url_set;
+      typedef url_set::size_type      urls_size_type;
+      typedef transform_iterator<repo::RepoVariablesUrlReplacer, url_set::const_iterator> urls_const_iterator;
+      /**
+       * whether repository urls are available
+       */
+      bool baseUrlsEmpty() const;
+      /**
+       * number of repository urls
+       */
+      urls_size_type baseUrlsSize() const;
+      /**
+       * iterator that points at begin of repository urls
+       */
+      urls_const_iterator baseUrlsBegin() const;
+      /**
+       * iterator that points at end of repository urls
+       */
+      urls_const_iterator baseUrlsEnd() const;
+      /**
+       * A Url under which the metadata are located, or a set of mirrors.
+       *
+       * This can't be empty in order the repository to be valid
+       * unless the download of the mirror list succeeds and it
+       * contains a valid url.
+       *
+       * \deprecated IMO superfluous as we provide begin/end iterator.
+       */
+      std::set<Url> baseUrls() const;
+      /**
+       * Add a base url. \see baseUrls
+       * \param url The base url for the repository.
+       * \note can change keepPackages,so change it after this call
+       *
+       * To recreate the base URLs list, use \ref setBaseUrl(const Url &) followed
+       * by addBaseUrl().
+       */
+      void addBaseUrl( const Url &url );
+      /**
+       * Clears current base URL list and adds \a url.
+       * \note can change keepPackages,so change it after this call
+       */
+      void setBaseUrl( const Url &url );
+
+      /**
+       * \short Repository path
+       *
+       * Pathname relative to the base Url where the product/repository
+       * is located
+       *
+       * For medias containing more than one product, or repositories not
+       * located at the root of the media it is important to
+       * know the path of the media root relative to the product directory
+       * so a media verifier can be set for that media.
+       *
+       * It is not mandatory, and the default is /
+       *
+       * \note As a repository can have multiple Urls, the path is unique and
+       * the same for all Urls, so it is assumed all the Urls have the
+       * same media layout.
+       *
+       */
+      Pathname path() const;
+      /**
+       * set the product path. \see path()
+       * \param path the path to the product
+       */
+      void setPath( const Pathname &path );
+
+      /**
+       * Url of a file which contains a list of Urls
+       * If empty, the base url will be used.
+       */
+      Url mirrorListUrl() const;
+      /**
+       * Set mirror list url. \see mirrorListUrl
+       * \param url The base url for the list
+       */
+      void setMirrorListUrl( const Url &url );
+
+      /**
+       * Type of repository,
+       *
+       */
+      repo::RepoType type() const;
+      /**
+       * This allows to adjust the \ref  RepoType lazy, from \c NONE to
+       * some probed value, even for const objects.
+       *
+       * This is a NOOP if the current type is not \c NONE.
+       */
+      void setProbedType( const repo::RepoType &t ) const;
+      /**
+       * set the repository type \see type
+       * \param t
+       */
+      void setType( const repo::RepoType &t );
+
+      /**
+       * \short Path where this repo metadata was read from
+       *
+       * \note could be an empty pathname for repo
+       * infos created in memory.
+       */
+      Pathname metadataPath() const;
+      /**
+       * \short set the path where the local metadata is stored
+       *
+       * The path to the metadata of this repository
+       * was defined, or empty if nowhere.
+       *
+       * \param path directory path
+       */
+      void setMetadataPath( const Pathname &path );
+
+      /**
+       * \short Path where this repo packages are cached
+       */
+      Pathname packagesPath() const;
+      /**
+       * \short set the path where the local packages are stored
+       *
+       * \param path directory path
+       */
+      void setPackagesPath( const Pathname &path );
+
+      /**
+       * \short Whether to check or not this repository with gpg
+       *
+       * \note This is a just a hint to the application and can
+       * be ignored.
+       *
+       */
+      bool gpgCheck() const;
+      /**
+       * \short Whether to check or not this repository with gpg
+       *
+       * \param check true (check) or false (dont'check)
+       *
+       * \note This is a just a hint to the application and can
+       * be ignored.
+       *
+       */
+      void setGpgCheck( bool check );
+
+      /**
+       * \short Key to use for gpg checking of this repository
+       *
+       * \param url Url to the key in ASCII armored format
+       *
+       * \note This is a just a hint to the application and can
+       * be ignored.
+       *
+       */
+      Url gpgKeyUrl() const;
+      /**
+       * \short Key to use for gpg checking of this repository
+       *
+       * \param url Url to the key in ASCII armored format
+       *
+       * \note This is a just a hint to the application and can
+       * be ignored.
+       *
+       */
+      void setGpgKeyUrl( const Url &gpgkey );
+
+      /**
+       * \short Whether to keep the packages downloaded from this repository will be kept in local cache
+       */
+      bool keepPackages() const;
+      /**
+       * \short Set if the packaqes downloaded from this repository will be kept in local cache
+       *
+       * If the setting is true, all downloaded packages from this repository will be
+       * copied to the local raw cache.
+       *
+       * \param keep true (keep the downloaded packages) or false (delete them after installation)
+       *
+       */
+      void setKeepPackages( bool keep );
+
+      /**
+       * Gets name of the service to which this repository belongs or empty string
+       * if it has been added manually.
+       */
+      std::string service() const;
+      /**
+       * sets service which added this repository
+       */
+      void setService( const std::string& name );
+
+      /**
+       * Distribution for which is this repository meant.
+       */
+      std::string targetDistribution() const;
+      /**
+       * Sets the distribution for which is this repository meant. This is
+       * an in-memory value only, does not get written to the .repo file upon
+       * saving.
+       */
+      void setTargetDistribution(const std::string & targetDistribution);
 
-     /**
-      * whether repository urls are available
+    public:
+      /** \name Repository license
       */
-    bool baseUrlsEmpty() const;
+      //@{
+      /** Whether there is a license associated with the repo. */
+      bool hasLicense() const;
 
-    /**
-     * Type of repository,
-     *
-     */
-    repo::RepoType type() const;
-
-    /**
-     * \short Path where this repo metadata was read from
-     *
-     * \note could be an empty pathname for repo
-     * infos created in memory.
-     */
-     Pathname metadataPath() const;
-
-    /**
-     * \short Path where this repo packages are cached
-     */
-     Pathname packagesPath() const;
-
-    /**
-     * \short Whether to check or not this repository with gpg
-     *
-     * \note This is a just a hint to the application and can
-     * be ignored.
-     *
-     */
-    bool gpgCheck() const;
-
-    /**
-     * \short Key to use for gpg checking of this repository
-     *
-     * \param url Url to the key in ASCII armored format
-     *
-     * \note This is a just a hint to the application and can
-     * be ignored.
-     *
-     */
-     Url gpgKeyUrl() const;
-
-    /**
-     * \short Whether to keep the packages downloaded from this repository will be kept in local cache
-     */
-    bool keepPackages() const;
-
-    /**
-     * Gets name of the service to which this repository belongs or empty string
-     * if it has been added manually.
-     */
-    std::string service() const;
-
-    /**
-     * Distribution for which is this repository meant.
-     */
-    std::string targetDistribution() const;
+      /** Return the best license file for the current (or a specified) locale. */
+      ManagedFile getLicense( const Locale & lang_r = Locale() );
 
+      /** Return the locales the license is available for.
+       * \ref Locale::noCode is included in case of \c license.txt which does
+       * not specify a specific locale.
+      */
+      LocaleSet getLicenseLocales() const;
+      //@}
     public:
-    /**
-     * Add a base url. \see baseUrls
-     * \param url The base url for the repository.
-     * \note can change keepPackages,so change it after this call
-     *
-     * To recreate the base URLs list, use \ref setBaseUrl(const Url &) followed
-     * by addBaseUrl().
-     */
-    void addBaseUrl( const Url &url );
-
-    /**
-     * Clears current base URL list and adds \a url.
-     * \note can change keepPackages,so change it after this call
-     */
-    void setBaseUrl( const Url &url );
-
-    /**
-     * set the product path. \see path()
-     * \param path the path to the product
-     */
-    void setPath( const Pathname &path );
-
-    /**
-     * Set mirror list url. \see mirrorListUrl
-     * \param url The base url for the list
-     */
-    void setMirrorListUrl( const Url &url );
-
-    /**
-     * set the repository type \see type
-     * \param t
-     */
-    void setType( const repo::RepoType &t );
-
-    /**
-     * This allows to adjust the \ref  RepoType lazy, from \c NONE to
-     * some probed value, even for const objects.
-     *
-     * This is a NOOP if the current type is not \c NONE.
-     */
-    void setProbedType( const repo::RepoType &t ) const;
-
-    /**
-     * \short set the path where the local metadata is stored
-     *
-     * The path to the metadata of this repository
-     * was defined, or empty if nowhere.
-     *
-     * \param path directory path
-     */
-    void setMetadataPath( const Pathname &path );
-
-    /**
-     * \short set the path where the local packages are stored
-     *
-     * \param path directory path
-     */
-    void setPackagesPath( const Pathname &path );
-
-    /**
-     * \short Whether to check or not this repository with gpg
-     *
-     * \param check true (check) or false (dont'check)
-     *
-     * \note This is a just a hint to the application and can
-     * be ignored.
-     *
-     */
-    void setGpgCheck( bool check );
-
-    /**
-     * \short Key to use for gpg checking of this repository
-     *
-     * \param url Url to the key in ASCII armored format
-     *
-     * \note This is a just a hint to the application and can
-     * be ignored.
-     *
-     */
-    void setGpgKeyUrl( const Url &gpgkey );
-
-    /**
-     * \short Set if the packaqes downloaded from this repository will be kept in local cache
-     *
-     * If the setting is true, all downloaded packages from this repository will be
-     * copied to the local raw cache.
-     *
-     * \param keep true (keep the downloaded packages) or false (delete them after installation)
-     *
-     */
-    void setKeepPackages( bool keep );
-
-    /**
-     * sets service which added this repository
-     */
-    void setService( const std::string& name );
-
-    /**
-     * Sets the distribution for which is this repository meant. This is
-     * an in-memory value only, does not get written to the .repo file upon
-     * saving.
-     */
-    void setTargetDistribution(const std::string & targetDistribution);
-
-    /**
-     * Write a human-readable representation of this RepoInfo object
-     * into the \a str stream. Useful for logging.
-     */
-    virtual std::ostream & dumpOn( std::ostream & str ) const;
-
-    /**
-     * Write this RepoInfo object into \a str in a <tr>.repo</tt> file format.
-     */
-    virtual std::ostream & dumpAsIniOn( std::ostream & str ) const;
-    /** \deprecated use dumpAsIniOn(ostream) instead */
-    ZYPP_DEPRECATED virtual std::ostream & dumpRepoOn( std::ostream & str ) const;
-
-    /**
-     * Write an XML representation of this RepoInfo object.
-     */
-    virtual std::ostream & dumpAsXMLOn(std::ostream & str) const;
-
-    /**
-     * Write an XML representation of this RepoInfo object.
-     *
-     * \param str
-     * \param content this argument is ignored (used in other classed derived
-     *                from RepoInfoBase.
-     */
-    virtual std::ostream & dumpAsXMLOn(
-        std::ostream & str, const std::string & content) const;
-
-    class Impl;
-  private:
-    /** Pointer to implementation */
-    RWCOW_pointer<Impl> _pimpl;
+      /**
+       * Write a human-readable representation of this RepoInfo object
+       * into the \a str stream. Useful for logging.
+       */
+      virtual std::ostream & dumpOn( std::ostream & str ) const;
+
+      /**
+       * Write this RepoInfo object into \a str in a <tr>.repo</tt> file format.
+       */
+      virtual std::ostream & dumpAsIniOn( std::ostream & str ) const;
+
+      /**
+       * Write an XML representation of this RepoInfo object.
+       */
+      virtual std::ostream & dumpAsXMLOn(std::ostream & str) const;
+
+      /**
+       * Write an XML representation of this RepoInfo object.
+       *
+       * \param str
+       * \param content this argument is ignored (used in other classed derived
+       *                from RepoInfoBase.
+       */
+      virtual std::ostream & dumpAsXMLOn( std::ostream & str, const std::string & content ) const;
+
+      class Impl;
+    private:
+      /** Pointer to implementation */
+      RWCOW_pointer<Impl> _pimpl;
   };
   ///////////////////////////////////////////////////////////////////
 
index 72e2267..2744741 100644 (file)
@@ -1615,10 +1615,11 @@ namespace zypp
       removeRepository(*rit);
   }
 
-
   void RepoManager::removeService( const ServiceInfo & service )
   { removeService(service.alias()); }
 
+  ////////////////////////////////////////////////////////////////////////////
+
   void RepoManager::refreshServices()
   {
     // copy the set of services since refreshService
@@ -1633,15 +1634,17 @@ namespace zypp
     }
   }
 
-  void RepoManager::refreshService( const ServiceInfo & dont_use_service_r )
-  {
-    assert_alias( dont_use_service_r );
-    assert_url( dont_use_service_r );
+  void RepoManager::refreshService( const ServiceInfo & service )
+  { refreshService( service.alias() ); }
 
+  void RepoManager::refreshService( const std::string & alias )
+  {
+    ServiceInfo service( getService( alias ) );
+    assert_alias( service );
+    assert_url( service );
     // NOTE: It might be necessary to modify and rewrite the service info.
     // Either when probing the type, or when adjusting the repositories
-    // enable/disable state. Thus 'dont_use_service_r' but 'service':
-    ServiceInfo service( dont_use_service_r );
+    // enable/disable state.:
     bool serviceModified = false;
     MIL << "going to refresh service '" << service.alias() << "', url: "<< service.url() << endl;
 
@@ -1812,6 +1815,7 @@ namespace zypp
     }
   }
 
+  ////////////////////////////////////////////////////////////////////////////
 
   void RepoManager::modifyService(const std::string & oldAlias, const ServiceInfo & service)
   {
index 2706215..b7c625a 100644 (file)
@@ -549,7 +549,7 @@ namespace zypp
      * \throws Exception if file contain more services and rewrite file failed
      */
     void removeService( const std::string & alias );
-
+    /** \overload Take alias from ServiceInfo */
     void removeService( const ServiceInfo & service );
 
 
@@ -563,9 +563,13 @@ namespace zypp
     /**
      * Refresh specific service.
      *
-     * \param name service structure
+     * \param alias unique indientifier of the service to refresh
+     *
+     * \throws RepoException if service is not found.
      * \throws MediaException If there's a problem downloading the repo index file.
      */
+    void refreshService( const std::string & alias );
+    /** \overload Take alias from ServiceInfo */
     void refreshService( const ServiceInfo & service );
 
     /**
@@ -584,7 +588,7 @@ namespace zypp
      * \throws RepoException if sservice with oldAlias is not known
      * \throws Exception if have problems with files
      */
-    void modifyService(const std::string & oldAlias, const ServiceInfo & service);
+    void modifyService( const std::string & oldAlias, const ServiceInfo & service );
 
   private:
     /**
@@ -648,45 +652,45 @@ namespace zypp
     /**
      * Checks for existing repository license files of \a repo and extract them
      * in \a target directory.
-     * 
+     *
      * \param repo   Repository to check.
      * \param target Path to directory where the license files should be copied.
      * \return true if license files were found and successfully extracted,
      *         false otherwise.
      */
-    bool getLicenseFiles(const RepoInfo & repo, const Pathname & target);
+    bool getLicenseFiles(const RepoInfo & repo, const Pathname & target) ZYPP_DEPRECATED;
 
     /**
      * Returns path to a license file suitable for current system locale, given
      * a directory with all available license files. License files' names must
      * match the following regex: <tt>^license\.?(.*)\.txt$</tt> where the
      * substring enclosed in parentheses is the locale code.
-     * 
-     * Examples: license.en_US.txt, license.en.txt, license.txt 
-     * 
+     *
+     * Examples: license.en_US.txt, license.en.txt, license.txt
+     *
      * \param ldir Path to a directory containing all license files.
      * \return path to the license file, or an empty path on failure.
-     * 
+     *
      * \see getLicenseFiles(RepoInfo const&, Pathanme const&)
      */
-    Pathname getLicenseFile( const Pathname & ldir );
+    Pathname getLicenseFile( const Pathname & ldir ) ZYPP_DEPRECATED;
 
     /**
      * Returns path to a license file suitable for given \a locale, given
      * a directory with all available license files.
-     * 
+     *
      * \param ldir Path to a directory containing all license files.
      * \return path to the license file, or an empty path on failure.
-     * 
+     *
      * \see getLicenseFiles(RepoInfo const&, Pathanme const&)
      * \see getLicenseFile(Pathanme const&)
      */
-    Pathname getLicenseFile( const Pathname & ldir, const Locale & locale );
+    Pathname getLicenseFile( const Pathname & ldir, const Locale & locale ) ZYPP_DEPRECATED;
 
     /**
      * \todo implement
      */
-    std::set<Locale> getAvailableLicenseLocales( const Pathname & ldir );
+    std::set<Locale> getAvailableLicenseLocales( const Pathname & ldir ) ZYPP_DEPRECATED;
 
   protected:
     RepoStatus rawMetadataStatus( const RepoInfo &info );
index 448785c..708b246 100644 (file)
@@ -62,7 +62,7 @@ namespace zypp
     zypp::Date Repository::generatedTimestamp() const
     {
         ::Dataiterator di;
-        ::dataiterator_init(&di, get(), SOLVID_META, REPOSITORY_TIMESTAMP, 0, 0);
+        ::dataiterator_init(&di, sat::Pool::instance().get(), get(), SOLVID_META, REPOSITORY_TIMESTAMP, 0, 0);
         if (::dataiterator_step(&di))
         {
             do
@@ -92,7 +92,7 @@ namespace zypp
     zypp::Date Repository::suggestedExpirationTimestamp() const
     {
         ::Dataiterator di;
-        ::dataiterator_init(&di, get(), SOLVID_META, REPOSITORY_EXPIRE, 0, 0);
+        ::dataiterator_init(&di, sat::Pool::instance().get(), get(), SOLVID_META, REPOSITORY_EXPIRE, 0, 0);
         Date generated = generatedTimestamp();
         // do not calculate over a missing generated
         // timestamp
index 50a28f0..9c29231 100644 (file)
@@ -80,7 +80,8 @@ namespace zypp
         DBG << "package: " << package << endl;
         {
           ::Dataiterator di;
-          ::dataiterator_init(&di, NULL
+          ::dataiterator_init(&di
+            , sat::Pool::instance().get()
             , it->get()                                              // in this repo
             , SOLVID_META                                         // in metadata
             , REPOSITORY_DELTAINFO, 0, 0 );
@@ -90,6 +91,7 @@ namespace zypp
               ::dataiterator_setpos( &di );
               ::Dataiterator di2;
               ::dataiterator_init(&di2
+                  , sat::Pool::instance().get()
                   , it->get()                                       // in this repo
                   , SOLVID_POS                                   // in metadata
                   , DELTA_PACKAGE_NAME
index ec4f39f..ddbed20 100644 (file)
@@ -36,7 +36,7 @@ namespace zypp
     {
       MIL << "creating deltarpm from repo " << repo.alias() << ", id " << extraid << endl;
       ::Dataiterator di;
-      ::dataiterator_init(&di, NULL, repo.get(), extraid, 0, 0, 0);
+      ::dataiterator_init(&di, sat::Pool::instance().get(), repo.get(), extraid, 0, 0, 0);
 
       string locdir;
       string locname;
index 41835c2..0b6cd5d 100644 (file)
@@ -42,12 +42,12 @@ namespace zypp
       bool chain = false;
 
       if ( _solv )
-        ::dataiterator_init( dip.get(), _solv.repository().id(), _solv.id(), _attr.id(), 0, 0 );
+        ::dataiterator_init( dip.get(), sat::Pool::instance().get(), _solv.repository().id(), _solv.id(), _attr.id(), 0, 0 );
       else if ( _repo )
-        ::dataiterator_init( dip.get(), _repo.id(), 0, _attr.id(), 0, 0 );
+        ::dataiterator_init( dip.get(), sat::Pool::instance().get(), _repo.id(), 0, _attr.id(), 0, 0 );
       else if ( ! sat::Pool::instance().reposEmpty() )
       {
-        ::dataiterator_init( dip.get(), sat::Pool::instance().reposBegin()->id(), 0, _attr.id(), 0, 0 );
+        ::dataiterator_init( dip.get(), sat::Pool::instance().get(), sat::Pool::instance().reposBegin()->id(), 0, _attr.id(), 0, 0 );
         chain = true;
       }
       else