Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ur repo-clean-0.1.3.xz/Sconstruct repo-clean-0.1.3/Sconstruct
- --- repo-clean-0.1.3.xz/Sconstruct 2012-01-21 17:41:30.000000000 +1100
- +++ repo-clean-0.1.3/Sconstruct 2012-01-21 17:19:26.710577264 +1100
- @@ -14,7 +14,7 @@
- general_flags = ' -Wall -D\'VERSION=\\\"%s\\\"\' ' % version
- debug_flags=' -g -O0 -DDEBUG '
- release_flags=' -O3 '
- -cclibs = ' -lalpm -lboost_filesystem '
- +cclibs = ' -lalpm -lboost_filesystem -lboost_system '
- ccflags = general_flags
- if int(ARGUMENTS.get('debug', 0)):
- diff -ur repo-clean-0.1.3.xz/src/repo-clean.cpp repo-clean-0.1.3/src/repo-clean.cpp
- --- repo-clean-0.1.3.xz/src/repo-clean.cpp 2012-01-21 17:41:30.000000000 +1100
- +++ repo-clean-0.1.3/src/repo-clean.cpp 2012-01-21 17:19:26.700577264 +1100
- @@ -36,6 +36,8 @@
- #define _(String) gettext (String)
- #define foreach BOOST_FOREACH
- +#define ROOT "/"
- +#define DBPATH "/var/lib/pacman/"
- struct version_item
- {
- @@ -201,13 +203,14 @@
- // build comp_tree
- arch_comparing_tree arch_comp_tree;
- int total = list.size(), err = 0, ign = 0;
- - alpm_initialize();
- + alpm_handle_t *handle;
- + handle = alpm_initialize(ROOT, DBPATH, NULL);
- for (unsigned int i = 0; i < list.size(); i++)
- {
- // load package
- - pmpkg_t *pkg= NULL;
- + alpm_pkg_t *pkg= NULL;
- std::string path = list[i];
- - if (alpm_pkg_load(path.c_str(), 0, &pkg) == 0)
- + if (alpm_pkg_load(handle, path.c_str(), 0, ALPM_SIG_USE_DEFAULT, &pkg) == 0)
- {
- std::string pkg_name = alpm_pkg_get_name(pkg);
- std::string pkg_version = alpm_pkg_get_version(pkg);
- @@ -233,7 +236,7 @@
- }
- }
- VERBOSE_PRINTF(_("%cTotal: %d Ignored: %d Corrupted: %d\n"), '\r', total, ign, err);
- - alpm_release();
- + alpm_release(handle);
- // check if comp_tree contain multiversion packages
- bool found_multiversions = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement