6 #include "boost/filesystem/operations.hpp" // includes boost/filesystem/path.hpp
7 #include "boost/filesystem/fstream.hpp" // ditto
9 #include <boost/iostreams/device/file_descriptor.hpp>
11 #include <zypp/base/Logger.h>
12 #include <zypp/Locale.h>
13 #include <zypp/ZYpp.h>
14 #include <zypp/ZYppFactory.h>
15 #include <zypp/TranslatedText.h>
16 ///////////////////////////////////////////////////////////////////
18 #include <zypp/base/Logger.h>
24 #include "zypp/CapFactory.h"
25 #include "zypp/KeyRing.h"
26 #include "zypp/Product.h"
27 #include "zypp/Selection.h"
28 #include "zypp/Package.h"
29 #include "zypp/PublicKey.h"
31 #include "zypp/ZYppFactory.h"
33 #include "zypp/MediaSetAccess.h"
34 #include "zypp/SourceFactory.h"
35 #include "zypp2/source/yum/YUMSourceCacher.h"
37 #include "testsuite/src/utils/TestUtils.h"
39 using namespace zypp::detail;
43 using namespace zypp::source;
44 //using namespace DbXml;
46 #define TestKind Selection
52 ZYpp::Ptr z = getZYpp();
53 z->initializeTarget("/");
55 //SourceManager_Ptr manager = SourceManager::sourceManager();
57 Source_Ref source = SourceFactory().createFrom( Url("dir:/space/rpms/duncan/vim/i386"), "/", "bleh", Pathname() );
58 ResStore store = source.resolvables();
59 //zypp::testsuite::utils::dump(store, true, true);
61 for (ResStore::const_iterator it = store.begin(); it != store.end(); ++it)
63 zypp::Package::Ptr res = asKind<zypp::Package>( *it );
64 MIL << res->name() << " " << res->edition() << " " << res->location() << std::endl;
67 /*for (ResStore::resfilter_const_iterator it = z->target()->byKindBegin(ResTraits<TestKind>::kind); it != z->target()->byKindEnd(ResTraits<TestKind>::kind); ++it)
69 zypp::TestKind::constPtr res = asKind<const zypp::TestKind>( *it );
70 MIL << res->name() << " " << res->edition() << std::endl;
74 catch ( const Exception &e )
76 MIL << "Sorry, bye" << endl;