#include "zypp/base/LogTools.h"
#include "zypp/base/InputStream.h"
+#include "zypp/TmpPath.h"
#include "zypp/RepoManager.h"
using std::endl;
RepoManager makeRepoManager( const Pathname & mgrdir_r )
{
- RepoManagerOptions mgropt;
+ RepoManagerOptions mgropt;
mgropt.repoCachePath = mgrdir_r/"cache";
mgropt.repoRawCachePath = mgrdir_r/"raw_cache";
mgropt.knownReposPath = mgrdir_r/"repos";
{
INT << "===[START]==========================================" << endl;
- RepoManager repoManager( makeRepoManager( "/tmp/myrepos" ) );
+ RepoManager repoManager( makeRepoManager( "/ROOT" ) );
RepoInfoList repos = repoManager.knownRepositories();
SEC << repos << endl;
//zypp::base::LogControl::instance().logfile( "log.restrict" );
INT << "===[START]==========================================" << endl;
- RepoManager repoManager;
+ RepoManager repoManager( makeRepoManager( "/ROOT" ) );
RepoInfoList repos = repoManager.knownRepositories();
SEC << repos << endl;
.addBaseUrl( Url("ftp://dist.suse.de/install/stable-x86/") );
repoManager.addRepository( nrepo );
- repos = repoManager.knownRepositories();
SEC << "refreshMetadat" << endl;
repoManager.refreshMetadata( nrepo );
SEC << "buildCache" << endl;
repoManager.buildCache( nrepo );
SEC << "------" << endl;
+ repos = repoManager.knownRepositories();
}
ResPool pool( getZYpp()->pool() );
SEC << "buildCache" << endl;
repoManager.buildCache( nrepo );
}
+
SEC << nrepo << endl;
+
Repository nrep( repoManager.createFromCache( nrepo ) );
const zypp::ResStore & store( nrep.resolvables() );
+
dumpPoolStats( SEC << "Store: " << endl,
store.begin(), store.end() ) << endl;
getZYpp()->addResolvables( store );
#include <zypp/pool/PoolStats.h>
#include <zypp/Repository.h>
+#include <zypp/RepoManager.h>
using namespace zypp;
using zypp::debug::Measure;
}
///////////////////////////////////////////////////////////////////
+
+inline 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 );
+}
+
+///////////////////////////////////////////////////////////////////
+
inline Repository createSource( const Url & url_r, const std::string & alias_r = std::string() )
{
Repository ret;