xbps-repo: added 'show-deps' target to mimic xbps-bin(8).
As consequence of this, remove xbps_callback_array_iter_in_repolist(). Nowadays to iter over the repository pool we have a SIMPLEQ, this allowed to simplify the code and remove some now unneeed stuff. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091124104704-oyvrmb3tmd59w4e7
This commit is contained in:
35
lib/plist.c
35
lib/plist.c
@@ -66,41 +66,6 @@ xbps_add_obj_to_array(prop_array_t array, prop_object_t obj)
|
||||
return true;
|
||||
}
|
||||
|
||||
int SYMEXPORT
|
||||
xbps_callback_array_iter_in_repolist(int (*fn)(prop_object_t, void *, bool *),
|
||||
void *arg)
|
||||
{
|
||||
prop_dictionary_t repolistd;
|
||||
char *plist;
|
||||
int rv = 0;
|
||||
|
||||
assert(fn != NULL);
|
||||
|
||||
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
|
||||
XBPS_META_PATH, XBPS_REPOLIST);
|
||||
if (plist == NULL)
|
||||
return EINVAL;
|
||||
|
||||
/*
|
||||
* Get the dictionary with the list of registered repositories.
|
||||
*/
|
||||
repolistd = prop_dictionary_internalize_from_file(plist);
|
||||
if (repolistd == NULL)
|
||||
return EINVAL;
|
||||
|
||||
/*
|
||||
* Iterate over the repository pool and run the associated
|
||||
* callback function. The loop is stopped when the bool
|
||||
* argument is true or the cb returns non 0.
|
||||
*/
|
||||
rv = xbps_callback_array_iter_in_dict(repolistd, "repository-list",
|
||||
fn, arg);
|
||||
prop_object_release(repolistd);
|
||||
free(plist);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
int SYMEXPORT
|
||||
xbps_callback_array_iter_in_dict(prop_dictionary_t dict, const char *key,
|
||||
int (*fn)(prop_object_t, void *, bool *),
|
||||
|
Reference in New Issue
Block a user