Added support for the long awaited feature: RSA signed repositories.

This commit is contained in:
Juan RP
2013-10-05 11:38:04 +02:00
parent ae2eea8937
commit 8d5c48b861
29 changed files with 1121 additions and 155 deletions

View File

@ -156,8 +156,15 @@ list_pkgs_pkgdb(struct xbps_handle *xhp)
static int
repo_list_uri_cb(struct xbps_repo *repo, void *arg _unused, bool *done _unused)
{
printf("%5zd %s\n", repo->idx ? (ssize_t)xbps_dictionary_count(repo->idx) : -1, repo->uri);
printf("%5zd %s",
repo->idx ? (ssize_t)xbps_dictionary_count(repo->idx) : -1,
repo->uri);
if (xbps_repository_is_remote(repo->uri)) {
printf(" (RSA %s, %s)",
repo->is_signed ? "signed" : "unsigned",
repo->is_verified ? "verified" : "unverified");
}
printf("\n");
return 0;
}

View File

@ -162,7 +162,7 @@ repo_ownedby_cb(struct xbps_repo *repo, void *arg, bool *done _unused)
struct ffdata *ffd = arg;
int rv;
filesd = xbps_repo_get_plist(repo, XBPS_PKGINDEX_FILES);
filesd = xbps_repo_get_plist(repo, XBPS_REPOIDX_FILES);
if (filesd == NULL)
return 0;

View File

@ -131,6 +131,9 @@ search_pkgs_cb(struct xbps_repo *repo, void *arg, bool *done _unused)
struct search_data *sd = arg;
int rv;
if (repo->idx == NULL)
return 0;
allkeys = xbps_dictionary_all_keys(repo->idx);
rv = xbps_array_foreach_cb(repo->xhp, allkeys, repo->idx, search_array_cb, sd);
xbps_object_release(allkeys);