summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apk_database.h2
-rw-r--r--src/database.c11
-rw-r--r--src/update.c3
3 files changed, 1 insertions, 15 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 1b23d51..f5c2889 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -140,8 +140,6 @@ int apk_db_index_write(struct apk_database *db, struct apk_ostream *os);
int apk_db_add_repository(apk_database_t db, apk_blob_t repository);
int apk_repository_update(struct apk_database *db, struct apk_repository *repo);
-int apk_repository_update_all(struct apk_database *db);
-
int apk_cache_download(struct apk_database *db, csum_t csum,
const char *url, const char *item);
int apk_cache_exists(struct apk_database *db, csum_t csum, const char *item);
diff --git a/src/database.c b/src/database.c
index 2b20c8f..293af4c 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1009,17 +1009,6 @@ int apk_repository_update(struct apk_database *db, struct apk_repository *repo)
return apk_cache_download(db, repo->url_csum, repo->url, apk_index_gz);
}
-int apk_repository_update_all(struct apk_database *db)
-{
- int i, ret;
- for (i = 0; i < db->num_repos; i++) {
- ret = apk_repository_update(db, &db->repos[i]);
- if (ret < 0)
- return ret;
- }
- return 0;
-}
-
int apk_db_add_repository(apk_database_t _db, apk_blob_t repository)
{
struct apk_database *db = _db.db;
diff --git a/src/update.c b/src/update.c
index aa7bd25..abf4021 100644
--- a/src/update.c
+++ b/src/update.c
@@ -19,10 +19,9 @@ static int update_main(void *ctx, int argc, char **argv)
{
struct apk_database db;
+ apk_flags |= APK_UPDATE_CACHE;
if (apk_db_open(&db, apk_root, APK_OPENF_READ) < 0)
return -1;
-
- apk_repository_update_all(&db);
apk_db_close(&db);
return 0;