[zypp-commit] r6094 - in /trunk/libzypp: VERSION.cmake devel/devel.ma/Main.cc zypp/repo/RepoProvideFile.cc
Author: mlandres
Date: Thu Jul 19 15:50:33 2007
New Revision: 6094
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6094&view=rev
Log:
- Fixed repo::provideFile to set a deleter for downloaded files
(#293004).
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Main.cc
trunk/libzypp/zypp/repo/RepoProvideFile.cc
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=6094&r1=6093&r2=6094&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Thu Jul 19 15:50:33 2007
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "3")
SET(LIBZYPP_MINOR "11")
SET(LIBZYPP_COMPATMINOR "10")
-SET(LIBZYPP_PATCH "9")
+SET(LIBZYPP_PATCH "10")
Modified: trunk/libzypp/devel/devel.ma/Main.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Main.cc?rev=6094&r1=6093&r2=6094&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Main.cc (original)
+++ trunk/libzypp/devel/devel.ma/Main.cc Thu Jul 19 15:50:33 2007
@@ -4,13 +4,24 @@
#include "zypp/base/LogTools.h"
#include "zypp/base/InputStream.h"
-#include "zypp/parser/IniDict.h"
+#include "zypp/RepoManager.h"
using std::endl;
using namespace zypp;
///////////////////////////////////////////////////////////////////
+RepoManager makeRepoManager( const Pathname & mgrdir_r )
+{
+ RepoManagerOptions mgropt;
+
+ mgropt.repoCachePath = mgrdir_r/"cache";
+ mgropt.repoRawCachePath = mgrdir_r/"raw_cache";
+ mgropt.knownReposPath = mgrdir_r/"repos";
+
+ return RepoManager( mgropt );
+}
+
/******************************************************************
**
** FUNCTION NAME : main
@@ -20,23 +31,31 @@
{
INT << "===[START]==========================================" << endl;
- Pathname file( "test.ini" );
- InputStream is( file );
- parser::IniDict dict( is );
+ RepoManager repoManager( makeRepoManager( "/tmp/myrepos" ) );
+ RepoInfoList repos = repoManager.knownRepositories();
+ SEC << repos << endl;
- SEC << endl;
- for_( it, dict.sectionsBegin(), dict.sectionsEnd() )
+ if ( repos.empty() )
{
- MIL << (*it) << endl;
-
- for_( ent, dict.entriesBegin(*it), dict.entriesEnd(*it) )
- {
- DBG << "'" << (*ent).first << "'='" << (*ent).second << "'" << endl;
- }
+ RepoInfo nrepo;
+ nrepo
+ .setAlias( "factorytest" )
+ .setName( "Test Repo for factory." )
+ .setEnabled( true )
+ .setAutorefresh( false )
+ .addBaseUrl( Url("ftp://dist.suse.de/install/stable-x86/") );
+
+ repoManager.addRepository( nrepo );
+ repos = repoManager.knownRepositories();
+ SEC << repos << endl;
+
+// SEC << "refreshMetadat" << endl;
+// repoManager.refreshMetadata( nrepo );
+// SEC << "buildCache" << endl;
+// repoManager.buildCache( nrepo );
+// SEC << "------" << endl;
}
- SEC << endl;
INT << "===[END]============================================" << endl << endl;
return 0;
}
-
Modified: trunk/libzypp/zypp/repo/RepoProvideFile.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/RepoProvideFile.cc?rev=6094&r1=6093&r2=6094&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/RepoProvideFile.cc (original)
+++ trunk/libzypp/zypp/repo/RepoProvideFile.cc Thu Jul 19 15:50:33 2007
@@ -54,26 +54,6 @@
function
participants (1)
-
mlandres@svn.opensuse.org