25 #define YUILogComponent "qt-pkg" 28 #include <zypp/ResPool.h> 29 #include <zypp/PoolItem.h> 31 #include "YQPkgFilters.h" 39 auto it = zypp::ResPool::instance().byKindBegin( zypp::ResKind::product );
40 auto end = zypp::ResPool::instance().byKindEnd( zypp::ResKind::product );
43 auto product_it = std::find_if(it, end, [&](
const zypp::PoolItem& item) {
47 if (product_it == end)
49 yuiMilestone() <<
"No product found " << std::endl;
53 product = zypp::asKind<zypp::Product>( product_it->resolvable() );
54 yuiMilestone() <<
"Found product " << product->name() << std::endl;
57 product_it = std::find_if(++product_it, end, [&](
const zypp::PoolItem& item) {
61 if (product_it == end)
64 product = zypp::asKind<zypp::Product>( product_it->resolvable() );
65 yuiMilestone() <<
"Found another product " << product->name() << std::endl;
static ZyppProduct singleProductFilter(std::function< bool(const zypp::PoolItem &item)> filter)
Returns the product if the filter finds a single product or null product if there are no or multiple ...