lib: remove xhp argument from xbps_plist_{array,dictionary}_from_file
This commit is contained in:
@@ -496,5 +496,5 @@ xbps_pkgdb_get_pkg_files(struct xbps_handle *xhp, const char *pkg)
|
||||
return NULL;
|
||||
|
||||
snprintf(plist, sizeof(plist)-1, "%s/.%s-files.plist", xhp->metadir, pkgname);
|
||||
return xbps_plist_dictionary_from_file(xhp, plist);
|
||||
return xbps_plist_dictionary_from_file(plist);
|
||||
}
|
||||
|
||||
@@ -934,27 +934,27 @@ xbps_string_equals_cstring(xbps_string_t s, const char *ss)
|
||||
|
||||
/* xbps specific helpers */
|
||||
xbps_array_t
|
||||
xbps_plist_array_from_file(struct xbps_handle *xhp, const char *f)
|
||||
xbps_plist_array_from_file(const char *path)
|
||||
{
|
||||
xbps_array_t a;
|
||||
|
||||
a = xbps_array_internalize_from_zfile(f);
|
||||
a = xbps_array_internalize_from_zfile(path);
|
||||
if (xbps_object_type(a) != XBPS_TYPE_ARRAY) {
|
||||
xbps_dbg_printf(
|
||||
"xbps: failed to internalize array from %s\n", f);
|
||||
"xbps: failed to internalize array from %s\n", path);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
xbps_dictionary_t
|
||||
xbps_plist_dictionary_from_file(struct xbps_handle *xhp, const char *f)
|
||||
xbps_plist_dictionary_from_file(const char *path)
|
||||
{
|
||||
xbps_dictionary_t d;
|
||||
|
||||
d = xbps_dictionary_internalize_from_zfile(f);
|
||||
d = xbps_dictionary_internalize_from_zfile(path);
|
||||
if (xbps_object_type(d) != XBPS_TYPE_DICTIONARY) {
|
||||
xbps_dbg_printf(
|
||||
"xbps: failed to internalize dict from %s\n", f);
|
||||
"xbps: failed to internalize dict from %s\n", path);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -660,7 +660,7 @@ xbps_repo_key_import(struct xbps_repo *repo)
|
||||
* Check if the public key is alredy stored.
|
||||
*/
|
||||
rkeyfile = xbps_xasprintf("%s/keys/%s.plist", repo->xhp->metadir, hexfp);
|
||||
repokeyd = xbps_plist_dictionary_from_file(repo->xhp, rkeyfile);
|
||||
repokeyd = xbps_plist_dictionary_from_file(rkeyfile);
|
||||
if (xbps_object_type(repokeyd) == XBPS_TYPE_DICTIONARY) {
|
||||
xbps_dbg_printf("[repo] `%s' public key already stored.\n", repo->uri);
|
||||
goto out;
|
||||
|
||||
@@ -98,7 +98,7 @@ xbps_verify_signature(struct xbps_repo *repo, const char *sigfile,
|
||||
* Prepare repository RSA public key to verify fname signature.
|
||||
*/
|
||||
rkeyfile = xbps_xasprintf("%s/keys/%s.plist", repo->xhp->metadir, hexfp);
|
||||
repokeyd = xbps_plist_dictionary_from_file(repo->xhp, rkeyfile);
|
||||
repokeyd = xbps_plist_dictionary_from_file(rkeyfile);
|
||||
if (xbps_object_type(repokeyd) != XBPS_TYPE_DICTIONARY) {
|
||||
xbps_dbg_printf("cannot read rkey data at %s: %s\n",
|
||||
rkeyfile, strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user