Let RepoManager::addRepository update the RepoInfos metadata and packages path.
authorMichael Andres <ma@suse.de>
Mon, 16 Nov 2009 14:31:46 +0000 (15:31 +0100)
committerMichael Andres <ma@suse.de>
Mon, 16 Nov 2009 14:31:46 +0000 (15:31 +0100)
zypp/RepoManager.cc

index 7ec5bbb..9af471e 100644 (file)
@@ -1354,7 +1354,13 @@ namespace zypp
     tosave.setFilepath(repofile);
     tosave.setMetadataPath( metadataPath( tosave ) );
     tosave.setPackagesPath( packagesPath( tosave ) );
-
+    {
+      // We chould fix the API as we must injet those paths
+      // into the repoinfo in order to keep it usable.
+      RepoInfo & oinfo( const_cast<RepoInfo &>(info) );
+      oinfo.setMetadataPath( metadataPath( tosave ) );
+      oinfo.setPackagesPath( packagesPath( tosave ) );
+    }
     _pimpl->repos.insert(tosave);
 
     progress.set(90);