3 #include "zypp/base/Easy.h"
4 #include "zypp/base/LogTools.h"
5 #include "zypp/base/InputStream.h"
6 #include "zypp/base/ReferenceCounted.h"
7 #include "zypp/base/NonCopyable.h"
8 #include "zypp/base/PtrTypes.h"
10 #include "zypp/TmpPath.h"
12 #include "zypp/RepoManager.h"
13 #include "zypp/RepoInfo.h"
15 #include "zypp/ResPoolProxy.h"
20 ///////////////////////////////////////////////////////////////////
22 static const Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") : "/Local/ROOT" );
24 ///////////////////////////////////////////////////////////////////
30 //zypp::base::LogControl::TmpLineWriter shutUp;
31 rres = getZYpp()->resolver()->resolvePool();
35 ERR << "resolve " << rres << endl;
38 MIL << "resolve " << rres << endl;
42 void mksrc( const std::string & url, const std::string & alias )
44 RepoManager repoManager( makeRepoManager( sysRoot ) );
51 .setAutorefresh( false )
52 .addBaseUrl( Url(url) );
54 if ( ! repoManager.isCached( nrepo ) )
56 repoManager.buildCache( nrepo );
59 repoManager.loadFromCache( nrepo );
62 /******************************************************************
64 ** FUNCTION NAME : main
65 ** FUNCTION TYPE : int
67 int main( int argc, char * argv[] )
69 INT << "===[START]==========================================" << endl;
71 ResPool pool( ResPool::instance() );
72 sat::Pool satpool( sat::Pool::instance() );
74 mksrc( "file:///schnell/CD-ARCHIVE/SLES10/SLE-10-SP1/SLES-10-SP1-GM/ia64/DVD1", "SLE" );
75 mksrc( "file:///mounts/dist/install/SLP/SLES-10-SP2-AS-LATEST/i386/CD1", "factorytest" );
77 USR << "pool: " << pool << endl;
79 getSel<Product>( "SUSE_SLES_SP1" )->setStatus( ui::S_Install );
80 //getSel<Pattern>( "basesystem" )->setStatus( ui::S_Install );
81 //getSel<Pattern>( "slesas-ofed-base" )->setStatus( ui::S_Install );
85 vdumpPoolStats( USR << "Transacting:"<< endl,
86 make_filter_begin<resfilter::ByTransact>(pool),
87 make_filter_end<resfilter::ByTransact>(pool) ) << endl;
89 vdumpPoolStats( USR << "Transacting:"<< endl,
90 make_filter_begin<resfilter::ByTransact>(pool),
91 make_filter_end<resfilter::ByTransact>(pool) ) << endl;
94 INT << "===[END]============================================" << endl << endl;