Another checkpoint for installing binary packages.
At least now dependencies are tracked, not sure it will be enough for real life :-) --HG-- extra : convert_revision : 962de22d515efa5599c148f918c14d32b5d9496d
This commit is contained in:
parent
30997094d6
commit
fa3b59b246
7 changed files with 266 additions and 111 deletions
25
lib/plist.c
25
lib/plist.c
|
@ -95,6 +95,31 @@ xbps_callback_array_iter_in_dict(prop_dictionary_t dict, const char *key,
|
|||
return ret;
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_find_pkg_from_plist(const char *plist, const char *pkgname)
|
||||
{
|
||||
prop_dictionary_t dict;
|
||||
prop_dictionary_t obj;
|
||||
|
||||
assert(plist != NULL);
|
||||
assert(pkgname != NULL);
|
||||
|
||||
dict = prop_dictionary_internalize_from_file(plist);
|
||||
if (dict == NULL) {
|
||||
errno = ENOENT;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
obj = xbps_find_pkg_in_dict(dict, pkgname);
|
||||
if (obj == NULL) {
|
||||
prop_object_release(dict);
|
||||
errno = ENOENT;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_find_pkg_in_dict(prop_dictionary_t dict, const char *pkgname)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue