From 87db9946b69accdf382a40f3be3485129564acf0 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Sun, 13 Apr 2008 01:10:05 +0000 Subject: [PATCH] make zypp-query-pool compile, but dont install yet --- tools/CMakeLists.txt | 4 ++-- tools/registration/CMakeLists.txt | 2 +- tools/registration/zypp-query-pool.cc | 25 +++++-------------------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 2ebab75..02e4671 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -#ADD_SUBDIRECTORY( registration ) +ADD_SUBDIRECTORY( registration ) ADD_SUBDIRECTORY( package-manager ) #ADD_SUBDIRECTORY( cachetools ) -#ADD_SUBDIRECTORY( migrate-sources ) \ No newline at end of file +#ADD_SUBDIRECTORY( migrate-sources ) diff --git a/tools/registration/CMakeLists.txt b/tools/registration/CMakeLists.txt index e89c621..ef4df13 100644 --- a/tools/registration/CMakeLists.txt +++ b/tools/registration/CMakeLists.txt @@ -7,4 +7,4 @@ TARGET_LINK_LIBRARIES( zypp-query-pool zypp ) TARGET_LINK_LIBRARIES( zypp-query-pool xml2 ) TARGET_LINK_LIBRARIES( zypp-query-pool ${SATSOLVER_LIBRARY} ) -INSTALL(TARGETS zypp-query-pool RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/zypp ) \ No newline at end of file +#INSTALL(TARGETS zypp-query-pool RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/zypp ) diff --git a/tools/registration/zypp-query-pool.cc b/tools/registration/zypp-query-pool.cc index 426b630..90cfafe 100644 --- a/tools/registration/zypp-query-pool.cc +++ b/tools/registration/zypp-query-pool.cc @@ -30,7 +30,7 @@ public: : _repository( repository ) { } - bool operator()( PoolItem_Ref item ) + bool operator()( PoolItem item ) { if (_repository.empty() || _repository == item->repository().info().alias()) @@ -69,7 +69,6 @@ query_pool( ZYpp::Ptr Z, string filter, const string & repository) if (filter == "packages") kind = ResTraits::kind; else if (filter == "patches") kind = ResTraits::kind; else if (filter == "patterns") kind = ResTraits::kind; - else if (filter == "selections") kind = ResTraits::kind; else if (filter == "products") kind = ResTraits::kind; else if (filter != FILTER_ALL) { @@ -101,7 +100,7 @@ query_pool( ZYpp::Ptr Z, string filter, const string & repository) MIL << "Must build cache..." << repo << endl; repoManager.buildCache( repo ); } - Z->addResolvables( repoManager.createFromCache( repo ).resolvables() ); + repoManager.loadFromCache( repo ); } MIL << "Loaded enabled repositories." << endl; } @@ -114,23 +113,9 @@ query_pool( ZYpp::Ptr Z, string filter, const string & repository) } // add resolvables from the system - if ( filter != FILTER_ALL ) - { - MIL << "Loading target (" << kind << ")..." << endl; - ResStore items; - for (ResStore::resfilter_const_iterator it = Z->target()->byKindBegin(kind); it != Z->target()->byKindEnd(kind); ++it) - { - SEC << *it << endl; - items.insert(*it); - } - Z->addResolvables( items, true ); - } - else - { - // no filter, just add themm all - MIL << "Loading target..." << endl; - Z->addResolvables( Z->target()->resolvables(), true ); - } + MIL << "Loading target..." << endl; + Z->target()->load(); + MIL << "Loaded target." << endl; -- 2.7.4