diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-19 19:01:15 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-19 19:01:15 +0200 |
commit | cb074581f0d65bc43188d3552dd72c405c53e5d9 (patch) | |
tree | fc9c0fdc884884e91c6f616131daf3d04b1a8944 /src/update.c | |
parent | b669e488ed97e16ec4acd769ecaee24fbeffcc7b (diff) | |
download | aports-cb074581f0d65bc43188d3552dd72c405c53e5d9.tar.bz2 aports-cb074581f0d65bc43188d3552dd72c405c53e5d9.tar.xz |
db: add function apk_repository_update_all
We might want to add an --update-index option to misc applets. For
example:
apk add --update-index -u package
apk version --update-index
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/update.c b/src/update.c index 4351653241..c34fc07bac 100644 --- a/src/update.c +++ b/src/update.c @@ -18,14 +18,11 @@ static int update_main(void *ctx, int argc, char **argv) { struct apk_database db; - int i; if (apk_db_open(&db, apk_root, APK_OPENF_READ) < 0) return -1; - for (i = 0; i < db.num_repos; i++) - apk_repository_update(&db, &db.repos[i]); - + apk_repository_update_all(&db); apk_db_close(&db); return 0; |