Implement support to update required_by objs when removing a pkg.

--HG--
extra : convert_revision : 405986d806ff23ce6348b22a2d7c48e0820ab1b9
This commit is contained in:
Juan RP 2009-02-27 16:03:25 +01:00
parent a711ace8f7
commit d9cc1d6b8f
8 changed files with 169 additions and 96 deletions

View file

@ -130,8 +130,7 @@ xbps_callback_array_iter_in_dict(prop_dictionary_t dict, const char *key,
prop_dictionary_t
xbps_find_pkg_from_plist(const char *plist, const char *pkgname)
{
prop_dictionary_t dict;
prop_dictionary_t obj, res;
prop_dictionary_t dict, obj, res;
assert(plist != NULL);
assert(pkgname != NULL);
@ -155,6 +154,22 @@ xbps_find_pkg_from_plist(const char *plist, const char *pkgname)
return res;
}
prop_dictionary_t
xbps_find_pkg_installed_from_plist(const char *pkgname)
{
prop_dictionary_t pkgd;
char *plist;
plist = xbps_append_full_path(true, NULL, XBPS_REGPKGDB);
if (plist == NULL)
return NULL;
pkgd = xbps_find_pkg_from_plist(plist, pkgname);
free(plist);
return prop_dictionary_copy(pkgd);
}
prop_dictionary_t
xbps_find_pkg_in_dict(prop_dictionary_t dict, const char *key,
const char *pkgname)