#include "zypp/CapFactory.h"
#include "zypp/KeyRing.h"
+#include "zypp/Product.h"
+#include "zypp/Selection.h"
#include "zypp/PublicKey.h"
#include "zypp/ZYppFactory.h"
using namespace zypp::source;
//using namespace DbXml;
+#define TestKind Selection
+
int main()
{
//MediaSetAccess ma( Url("cd:///"), Pathname("/"));
//zypp::source::yum::YUMSourceCacher cacher(Pathname("/"));
//cacher.cache( Url("dir:/space/tmp/factory-yum"), Pathname("/"));
ZYpp::Ptr z = getZYpp();
- z->initTarget("/", false);
+ z->initializeTarget("/");
+
+ for (ResStore::resfilter_const_iterator it = z->target()->byKindBegin(ResTraits<TestKind>::kind); it != z->target()->byKindEnd(ResTraits<TestKind>::kind); ++it)
+ {
+ zypp::TestKind::constPtr res = asKind<const zypp::TestKind>( *it );
+ MIL << res->name() << " " << res->edition() << std::endl;
+ }
}
catch ( const Exception &e )