- Provide an api to get the metadata path. Needed to fix #293428
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Mon, 24 Sep 2007 14:15:00 +0000 (14:15 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Mon, 24 Sep 2007 14:15:00 +0000 (14:15 +0000)
VERSION.cmake
package/libzypp.changes
zypp/RepoManager.cc
zypp/RepoManager.h
zypp/repo/RepoProvideFile.cc

index 92451dc..41d8e4c 100644 (file)
@@ -45,6 +45,6 @@
 #
 
 SET(LIBZYPP_MAJOR "3")
-SET(LIBZYPP_MINOR "24")
+SET(LIBZYPP_MINOR "25")
 SET(LIBZYPP_COMPATMINOR "24")
-SET(LIBZYPP_PATCH "8")
+SET(LIBZYPP_PATCH "0")
index e0673df..fcba5fb 100644 (file)
@@ -1,4 +1,14 @@
 -------------------------------------------------------------------
+Mon Sep 24 16:10:32 CEST 2007 - dmacvicar@suse.de
+
+- provide a way to retrieve the metadata path. Used for 
+  installation, which incorrectly creates a repository in
+  cache without adding it first, so metadata path is not
+  set and therefore it is not possible to setup a media
+  verifier on installation. Part of fix for (#293428)
+- 3.25.0
+
+-------------------------------------------------------------------
 Mon Sep 24 15:48:47 CEST 2007 - schubi@suse.de
 
 - If more than one resolvables provide a requirements and have different
index 2568e00..b6de5a8 100644 (file)
@@ -301,6 +301,13 @@ namespace zypp
 
   ////////////////////////////////////////////////////////////////////////////
 
+  Pathname RepoManager::metadataPath( const RepoInfo &info ) const
+  {
+    return rawcache_path_for_repoinfo(_pimpl->options, info );
+  }
+
+  ////////////////////////////////////////////////////////////////////////////
+      
   RepoStatus RepoManager::metadataStatus( const RepoInfo &info ) const
   {
     Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
index e7ca0d1..6708698 100644 (file)
@@ -161,6 +161,19 @@ namespace zypp
     bool checkIfToRefreshMetadata( const RepoInfo &info,
                                    const Url &url,
                                    RawMetadataRefreshPolicy policy = RefreshIfNeeded);
+    
+    /**
+     * \short Path where the metadata is downloaded and kept
+     *
+     * Given a repoinfo, tells where \ref RepoManager will download
+     * and keep the raw metadata.
+     *
+     * \param info Repository information
+     *
+     * \throws repo::RepoNoAliasException if can't figure an alias
+     */
+    Pathname metadataPath( const RepoInfo &info ) const;
+    
    /**
     * \short Refresh local raw cache
     *
index acb2902..44e3a6f 100644 (file)
@@ -115,8 +115,9 @@ namespace zypp
       {
         RepoInfo info = repo.info();
         // set a verifier if the repository has it
+         
         Pathname mediafile = info.metadataPath() + "/media.1/media";
-        if ( ! mediafile.empty() )
+        if ( ! info.metadataPath().empty() )
         {
           if ( PathInfo(mediafile).isExist() )
           {
@@ -159,12 +160,12 @@ namespace zypp
           }
           else
           {
-            WAR << "No media verifier for repo '" << info.alias() << "'" << endl;
+            WAR << "No media verifier for repo '" << info.alias() << "' media/media.1 does not exist in '" << info.metadataPath() << "'" << endl;
           }
         }
         else
         {
-          MIL << "Unknown metadata path for repo '" << info.alias() << "'. Can't set media verifier."<< endl;
+          WAR << "'" << info.alias() << "' metadata path is empty. Can't set verifier. Probably this repository does not come from RepoManager." << endl;
         }
       }