ADD_DEFINITIONS(
- -DSRC_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
- -DTESTS_SRC_DIR=\\\"${CMAKE_SOURCE_DIR}/tests\\\"
+ -DSRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
+ -DTESTS_SRC_DIR="${CMAKE_SOURCE_DIR}/tests"
)
SET( bridge_SRCS
#ADD_EXECUTABLE( yumparsertest YUMParser_test.cc )
#TARGET_LINK_LIBRARIES( yumparsertest zypp )
+
+ADD_EXECUTABLE( play play.cc )
+TARGET_LINK_LIBRARIES( play zypp boost_signals )
--- /dev/null
+#include <iostream>
+
+#include "zypp/base/LogTools.h"
+
+using std::endl;
+using std::cout;
+
+
+// ---------------------------------------------------------------------------
+
+int main( int argc, const char * argv[] )
+{
+ --argc; ++argv; // skip arg 0
+
+ cout << "done" << endl;
+ return 0;
+}
+
sat::Pool::instance().addRepoSolv(dir / "factory-nonoss.solv", i2);
RepoInfo i3; i3.setAlias("zypp_svn");
sat::Pool::instance().addRepoSolv(dir / "zypp_svn.solv", i3);
+ RepoInfo i5; i5.setAlias("pyton");
+ sat::Pool::instance().addRepoSolv(dir / "python.solv", i5);
RepoInfo i4; i4.setAlias("@System");
sat::Pool::instance().addRepoSolv(dir / "@System.solv", i4);
}
init_pool();
PoolQuery q;
- q.addAttribute(sat::SolvAttr::name, "zypper");
- q.setEdition(Edition("0.10.5-5"), Rel::LE);
+ q.addAttribute(sat::SolvAttr::name, "cjson");
/*
PoolQuery q;
*/
std::for_each(q.begin(), q.end(), &result_cb);
// cout << q.size() << endl;
- cout << q << endl;
+// cout << q << endl;
+ cout << "=====" << endl;
+ for_(it, q.selectableBegin(), q.selectableEnd())
+ cout << *it << endl;
}
#include "zypp/RepoInfo.h"
#include "zypp/Arch.h"
#include "zypp/Pathname.h"
-#include "zypp/RepoManager.h";
+#include "zypp/RepoManager.h"
using std::cout;
using std::endl;
RepoManager rm(repo_options);
- std::list<RepoInfo> repos = rm.knownRepositories();
- for ( std::list<RepoInfo>::const_iterator it = repos.begin();
- it != repos.end(); ++it )
+ for ( RepoManager::RepoConstIterator it = rm.repoBegin();
+ it != rm.repoEnd(); ++it )
{
cout << it->packagesPath() << endl;
}