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:
Juan RP 2008-12-24 07:20:19 +01:00
parent 30997094d6
commit fa3b59b246
7 changed files with 266 additions and 111 deletions

View file

@ -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)
{