libxbps: require a pointer to xbps_handle in functions that need it.

This removes 2 global vars from lib/initend.c and easier to know
what functions require access to xbps_handle.
This commit is contained in:
Juan RP
2012-06-14 08:22:11 +02:00
parent a3adbcda95
commit 3e9e87fc2a
60 changed files with 1143 additions and 901 deletions

View File

@@ -45,7 +45,10 @@
*/
int
check_pkg_rundeps(const char *pkgname, void *arg, bool *pkgdb_update)
check_pkg_rundeps(struct xbps_handle *xhp,
const char *pkgname,
void *arg,
bool *pkgdb_update)
{
prop_dictionary_t pkg_propsd = arg;
prop_object_t obj;
@@ -68,7 +71,7 @@ check_pkg_rundeps(const char *pkgname, void *arg, bool *pkgdb_update)
prop_object_iterator_release(iter);
return -1;
}
if (xbps_check_is_installed_pkg_by_pattern(reqpkg) <= 0) {
if (xbps_check_is_installed_pkg_by_pattern(xhp, reqpkg) <= 0) {
xbps_error_printf("%s: dependency not satisfied: %s\n",
pkgname, reqpkg);
test_broken = true;