summaryrefslogtreecommitdiff
path: root/src/app_update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_update.c')
-rw-r--r--src/app_update.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/app_update.c b/src/app_update.c
index 533cd1c..3a8e25f 100644
--- a/src/app_update.c
+++ b/src/app_update.c
@@ -24,7 +24,7 @@ static int update_main(void *ctx, struct apk_ctx *ac, struct apk_string_array *a
char buf[32] = "OK:";
if (apk_out_verbosity(out) < 1)
- return db->repo_update_errors;
+ return db->repositories.unavailable + db->repositories.stale;
for (i = 0; i < db->num_repos; i++) {
repo = &db->repos[i];
@@ -38,13 +38,15 @@ static int update_main(void *ctx, struct apk_ctx *ac, struct apk_string_array *a
URL_PRINTF(urlp));
}
- if (db->repo_update_errors != 0)
- snprintf(buf, sizeof(buf), "%d errors;",
- db->repo_update_errors);
+ if (db->repositories.unavailable || db->repositories.stale)
+ snprintf(buf, sizeof(buf), "%d unavailable, %d stale;",
+ db->repositories.unavailable,
+ db->repositories.stale);
+
apk_msg(out, "%s %d distinct packages available", buf,
db->available.packages.num_items);
- return db->repo_update_errors;
+ return db->repositories.unavailable + db->repositories.stale;
}
static struct apk_applet apk_update = {