summaryrefslogtreecommitdiff
path: root/src/update.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-09-03 14:56:24 +0400
committerTimo Teras <timo.teras@iki.fi>2009-09-03 14:56:24 +0400
commit58e771303c95f9d97d009602516b509866c3fb5a (patch)
tree9cf8ce0d4608d4531850177549cb70670544fbb4 /src/update.c
parent7829f1191f1812f30c763a685dff1b61393f7491 (diff)
downloadapk-tools-58e771303c95f9d97d009602516b509866c3fb5a.tar.gz
apk-tools-58e771303c95f9d97d009602516b509866c3fb5a.tar.bz2
apk-tools-58e771303c95f9d97d009602516b509866c3fb5a.tar.xz
apk-tools-58e771303c95f9d97d009602516b509866c3fb5a.zip
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".
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c18
1 files changed, 18 insertions, 0 deletions
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;
}