Introduce xbps_plist_{array,dictionary}_from_file().

Those are a wrapper around xbps_{array,dictionary}_internalize_from_zfile()
that prints a debugging msg when the plist file cannot be internalized.

Update xbps to use these wrappers.
This commit is contained in:
Juan RP
2015-05-28 10:15:05 +02:00
parent c4ed1b5845
commit 769a997afb
9 changed files with 59 additions and 10 deletions

View File

@ -540,7 +540,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_dictionary_internalize_from_zfile(rkeyfile);
repokeyd = xbps_plist_dictionary_from_file(repo->xhp, rkeyfile);
if (xbps_object_type(repokeyd) == XBPS_TYPE_DICTIONARY) {
xbps_dbg_printf(repo->xhp,
"[repo] `%s' public key already stored.\n", repo->uri);