lib: change xbps_dbg_printf to not require xbps_handle

This allows to simplify a lot of code by not having to pass around
the xbps handle everywhere just to print some debug information.
This commit is contained in:
Duncan Overbruck
2022-12-24 13:46:33 +01:00
parent 1a3d1ea56c
commit de484e9369
39 changed files with 288 additions and 300 deletions

View File

@@ -88,7 +88,7 @@ cleaner_cb(struct xbps_handle *xhp, xbps_object_t obj,
}
if (strcmp(binpkgarch, xhp->target_arch ? xhp->target_arch : xhp->native_arch) != 0 &&
strcmp(binpkgarch, "noarch") != 0) {
xbps_dbg_printf(xhp, "%s: ignoring binpkg with unmatched arch\n", binpkg);
xbps_dbg_printf("%s: ignoring binpkg with unmatched arch\n", binpkg);
return 0;
}
@@ -150,7 +150,7 @@ clean_cachedir(struct xbps_handle *xhp, bool drun)
if ((ext = strrchr(dp->d_name, '.')) == NULL)
continue;
if (strcmp(ext, ".xbps")) {
xbps_dbg_printf(xhp, "ignoring unknown file: %s\n", dp->d_name);
xbps_dbg_printf("ignoring unknown file: %s\n", dp->d_name);
continue;
}
xbps_array_add_cstring(array, dp->d_name);