Implement support to update required_by objs when removing a pkg.
--HG-- extra : convert_revision : 405986d806ff23ce6348b22a2d7c48e0820ab1b9
This commit is contained in:
parent
a711ace8f7
commit
d9cc1d6b8f
8 changed files with 169 additions and 96 deletions
19
lib/plist.c
19
lib/plist.c
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue