3 #include <zypp/ResPool.h>
4 #include <zypp/ResObjects.h>
5 #include <zypp/PoolQuery.h>
7 #include <zypp/misc/CheckAccessDeleted.h>
9 ///////////////////////////////////////////////////////////////////
11 Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") : "/Local/ROOT" );
13 ///////////////////////////////////////////////////////////////////
15 int main( int argc, char * argv[] )
19 zypp::base::LogControl::instance().logToStdErr();
20 INT << "===[START]==========================================" << endl;
24 sysRoot = Pathname(*argv);
25 setenv( "ZYPP_CONF", (sysRoot/"etc/zypp.conf").c_str(), true );
28 //TestSetup::LoadSystemAt( sysRoot );
29 ///////////////////////////////////////////////////////////////////
30 ResPool pool( ResPool::instance() );
31 sat::Pool satpool( sat::Pool::instance() );
32 ///////////////////////////////////////////////////////////////////
33 dumpRange( USR, satpool.reposBegin(), satpool.reposEnd() ) << endl;
34 USR << "pool: " << pool << endl;
35 ///////////////////////////////////////////////////////////////////
39 CheckAccessDeleted checker;
40 USR << checker << endl;
42 SEC << CheckAccessDeleted::findService( "syslog" ) << endl;
43 SEC << CheckAccessDeleted::findService( "syslogd" ) << endl;
44 SEC << CheckAccessDeleted::findService( "ssh" ) << endl;
45 SEC << CheckAccessDeleted::findService( "sshd" ) << endl;
46 SEC << CheckAccessDeleted::findService( 3844 ) << endl;
47 ///////////////////////////////////////////////////////////////////
48 INT << "===[END]============================================" << endl << endl;
49 zypp::base::LogControl::instance().logNothing();
52 catch ( const Exception & exp )
54 INT << exp << endl << exp.historyAsString();