xbps-repo: the 'search' target now accepts multiple patterns as arguments.

This commit is contained in:
Juan RP
2011-12-22 09:33:54 +01:00
parent 5a892023f4
commit 13331f801c
8 changed files with 75 additions and 55 deletions

View File

@@ -79,15 +79,14 @@ repo_list_uri_cb(struct repository_pool_index *rpi, void *arg, bool *done)
int
repo_search_pkgs_cb(struct repository_pool_index *rpi, void *arg, bool *done)
{
struct repo_search_data rsd;
struct repo_search_data *rsd = arg;
(void)done;
rsd.pattern = arg;
rsd.pkgver_len = find_longest_pkgver(rpi->rpi_repod);
rsd->pkgver_len = find_longest_pkgver(rpi->rpi_repod);
printf("From %s repository ...\n", rpi->rpi_uri);
(void)xbps_callback_array_iter_in_dict(rpi->rpi_repod,
"packages", show_pkg_namedesc, &rsd);
"packages", show_pkg_namedesc, rsd);
return 0;
}