diff --git a/lib/register.c b/lib/register.c index 8d753430..ae207ea2 100644 --- a/lib/register.c +++ b/lib/register.c @@ -76,24 +76,29 @@ xbps_register_pkg(prop_dictionary_t pkgrd, bool automatic) "packages", pkgname); if (pkgd == NULL) { rv = errno; + DPRINTF(("%s: find_pkg_in_dict_by_name failed: %s\n", + __func__, strerror(rv))); goto out; } if (!prop_dictionary_set_cstring_nocopy(pkgd, "version", version)) { prop_object_release(pkgd); rv = errno; + DPRINTF(("%s: version obj not found!\n", __func__)); goto out; } if (!prop_dictionary_set_cstring_nocopy(pkgd, "pkgver", pkgver)) { prop_object_release(pkgd); rv = errno; + DPRINTF(("%s: pkgver obj not found!\n", __func__)); goto out; } if (!prop_dictionary_set_cstring_nocopy(pkgd, "short_desc", desc)) { prop_object_release(pkgd); rv = errno; + DPRINTF(("%s: short_desc obj not found!\n", __func__)); goto out; } if (!prop_dictionary_get_bool(pkgd, @@ -102,6 +107,8 @@ xbps_register_pkg(prop_dictionary_t pkgrd, bool automatic) "automatic-install", automatic)) { prop_object_release(pkgd); rv = errno; + DPRINTF(("%s: autoinst obj not found!\n", + __func__)); goto out; } } @@ -114,11 +121,15 @@ xbps_register_pkg(prop_dictionary_t pkgrd, bool automatic) if (array == NULL) { prop_object_release(pkgd); rv = ENOENT; + DPRINTF(("%s: packages array obj not found!\n", + __func__)); goto out; } rv = xbps_requiredby_pkg_add(array, pkgrd); if (rv != 0) { prop_object_release(pkgd); + DPRINTF(("%s: requiredby_pkg_add failed %d\n", + __func__, rv)); goto out; } }