From 58e771303c95f9d97d009602516b509866c3fb5a Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 3 Sep 2009 14:56:24 +0400 Subject: index, version: support for repository descriptions (fixes #141) ability embed description information to repository indexes (e.g. repository name and version) and show it via "apk version -I". --- src/update.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/update.c') diff --git a/src/update.c b/src/update.c index eed5d45..b558342 100644 --- a/src/update.c +++ b/src/update.c @@ -17,6 +17,24 @@ static int update_main(void *ctx, struct apk_database *db, int argc, char **argv) { + struct apk_repository *repo; + int i; + + if (apk_verbosity < 1) + return 0; + + for (i = 0; i < db->num_repos; i++) { + repo = &db->repos[i]; + + if (APK_BLOB_IS_NULL(repo->description)) + continue; + + apk_message("%.*s [%s]", + repo->description.len, + repo->description.ptr, + db->repos[i].url); + } + return 0; } -- cgit v1.2.3