summaryrefslogtreecommitdiffstats
path: root/src/cache.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-20 11:13:03 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-20 11:13:03 +0300
commiteca9c22205105eba20e1e28ddae8ad9da81c5323 (patch)
tree3a31082b2a5082c10047249a0348478f77c93cf7 /src/cache.c
parent99be653f141f57e1474bd645efd770aa3e3bd68f (diff)
downloadapk-tools-eca9c22205105eba20e1e28ddae8ad9da81c5323.tar.bz2
apk-tools-eca9c22205105eba20e1e28ddae8ad9da81c5323.tar.xz
db: signed index loading (ref #46)
prefer index in the new format as signed .tar.gz.
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cache.c b/src/cache.c
index 7bcd636..7b5b7f1 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -54,7 +54,7 @@ static int cache_download(struct apk_database *db)
continue;
r = apk_cache_download(db, &pkg->csum, db->repos[i].url,
- pkgfile);
+ pkgfile, APK_SIGN_VERIFY_IDENTITY);
if (r != 0)
return r;
}
@@ -91,7 +91,8 @@ static int cache_clean(struct apk_database *db)
apk_blob_pull_hexdump(&b, APK_BLOB_BUF(csum));
apk_blob_pull_char(&b, '.');
- if (apk_blob_compare(b, APK_BLOB_STR(apk_index_gz)) == 0) {
+ if (apk_blob_compare(b, APK_BLOB_STR(apk_index_gz)) == 0 ||
+ apk_blob_compare(b, APK_BLOB_STR(apkindex_tar_gz)) == 0) {
/* Index - check for matching repository */
for (i = 0; i < db->num_repos; i++) {
if (memcmp(db->repos[i].csum.data,