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/PublicKey.h"
30 #include "zypp/ZYppFactory.h"
32 #include "zypp/MediaSetAccess.h"
33 #include "zypp/source/yum/YUMSourceCacher.h"
35 using namespace zypp::detail;
39 using namespace zypp::source;
40 //using namespace DbXml;
42 #define TestKind Selection
46 //MediaSetAccess ma( Url("cd:///"), Pathname("/"));
47 //MIL << "done 1" << std::endl;
48 //ChecksumFileChecker checker(CheckSum("sha1", "fa0abb22f703a3a41f7a39f0844b24daf572fd4c"));
49 //Pathname local = ma.provideFile("content", 1, checker);
50 //MIL << local << std::endl;
53 //zypp::source::yum::YUMSourceCacher cacher(Pathname("/"));
54 //cacher.cache( Url("dir:/space/tmp/factory-yum"), Pathname("/"));
55 ZYpp::Ptr z = getZYpp();
56 z->initializeTarget("/");
58 for (ResStore::resfilter_const_iterator it = z->target()->byKindBegin(ResTraits<TestKind>::kind); it != z->target()->byKindEnd(ResTraits<TestKind>::kind); ++it)
60 zypp::TestKind::constPtr res = asKind<const zypp::TestKind>( *it );
61 MIL << res->name() << " " << res->edition() << std::endl;
65 catch ( const Exception &e )
67 MIL << "Sorry, bye" << endl;