Revert "Verify index-meta for in-memory sync"

This reverts commit a1481cb285.
This commit is contained in:
Juan RP 2020-01-06 14:52:06 +01:00
parent e04cb2fa24
commit 79321f3ff0
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -180,8 +180,6 @@ xbps_repo_fetch_remote(struct xbps_repo *repo, const char *url)
{ {
struct archive *a; struct archive *a;
struct archive_entry *entry; struct archive_entry *entry;
xbps_dictionary_t idxmeta_tmp = NULL;
size_t meta_signature_len = 0;
uint8_t i = 0; uint8_t i = 0;
assert(url); assert(url);
@ -200,11 +198,10 @@ xbps_repo_fetch_remote(struct xbps_repo *repo, const char *url)
if (strcmp(bfile, "index-meta.plist") == 0) { if (strcmp(bfile, "index-meta.plist") == 0) {
buf = xbps_archive_get_file(a, entry); buf = xbps_archive_get_file(a, entry);
meta_digest = xbps_buffer_hash_raw(buf, strlen(buf)); repo->idxmeta = xbps_dictionary_internalize(buf);
idxmeta_tmp = xbps_dictionary_internalize(buf);
free(buf); free(buf);
i++; i++;
} else if (strcmp(bfile, "index.plist") == 0) { } else if (strcmp(bfile, XBPS_REPOIDX) == 0) {
buf = xbps_archive_get_file(a, entry); buf = xbps_archive_get_file(a, entry);
repo->idx = xbps_dictionary_internalize(buf); repo->idx = xbps_dictionary_internalize(buf);
free(buf); free(buf);
@ -212,7 +209,7 @@ xbps_repo_fetch_remote(struct xbps_repo *repo, const char *url)
} else { } else {
archive_read_data_skip(a); archive_read_data_skip(a);
} }
if (i == 3) if (i == 2)
break; break;
} }
archive_read_finish(a); archive_read_finish(a);
@ -223,9 +220,6 @@ xbps_repo_fetch_remote(struct xbps_repo *repo, const char *url)
if (xbps_object_type(repo->idx) == XBPS_TYPE_DICTIONARY) if (xbps_object_type(repo->idx) == XBPS_TYPE_DICTIONARY)
return true; return true;
free(meta_digest);
free(meta_signature);
return false; return false;
} }