summaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0006-db-make-missing-index-non-fatal.patch
blob: cfc5dd5714ea99e52557d06d046aa030c41c193d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From fac43e2d60b550425481052e521d141730a303de Mon Sep 17 00:00:00 2001
From: Timo Teras <timo.teras@iki.fi>
Date: Thu, 6 Aug 2009 13:12:26 +0300
Subject: [PATCH 6/7] db: make missing index non-fatal

it's a warning not an error to have non-existant repository.
bad signature means tampering; but we might want to just ignore
those. this is especially important if we have http repositories
and we are bootstrapping (without network).
---
 src/database.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/database.c b/src/database.c
index 834383b..f7c3ac0 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1282,7 +1282,7 @@ int apk_db_add_repository(apk_database_t _db, apk_blob_t repository)
 	}
 	if (bs == NULL) {
 		apk_warning("Failed to open index for %s", repo->url);
-		return -1;
+		return 0;
 	}
 
 	r = load_index(db, bs, targz, r);
-- 
1.6.4