summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-18 14:30:44 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-18 14:30:44 +0300
commit98c6b46de6d5074235e80617fd03c9e15cdd16e2 (patch)
treea4d219fa30071bdfcaa430b36cacd2d0d159b3d2 /src/commit.c
parentaf2b008bab6923f8b9582e68686826825d9e29a9 (diff)
downloadapk-tools-98c6b46de6d5074235e80617fd03c9e15cdd16e2.tar.gz
apk-tools-98c6b46de6d5074235e80617fd03c9e15cdd16e2.tar.bz2
apk-tools-98c6b46de6d5074235e80617fd03c9e15cdd16e2.tar.xz
apk-tools-98c6b46de6d5074235e80617fd03c9e15cdd16e2.zip
db: store repository tag names including leading @
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/commit.c b/src/commit.c
index 01ac4a8..4c6e53a 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -32,24 +32,13 @@ static int print_change(struct apk_database *db, struct apk_change *change,
struct apk_package *oldpkg = change->old_pkg;
struct apk_package *newpkg = change->new_pkg;
const char *msg = NULL;
- char status[32], n[512], *nameptr;
+ char status[32];
apk_blob_t *oneversion = NULL;
int r;
snprintf(status, sizeof(status), "(%i/%i)", cur+1, total);
- status[sizeof(status) - 1] = 0;
name = newpkg ? newpkg->name : oldpkg->name;
- if (change->new_repository_tag > 0) {
- snprintf(n, sizeof(n), "%s@" BLOB_FMT,
- name->name,
- BLOB_PRINTF(*db->repo_tags[change->new_repository_tag].name));
- n[sizeof(n) - 1] = 0;
- nameptr = n;
- } else {
- nameptr = name->name;
- }
-
if (oldpkg == NULL) {
msg = "Installing";
oneversion = newpkg->version;
@@ -84,12 +73,16 @@ static int print_change(struct apk_database *db, struct apk_change *change,
return FALSE;
if (oneversion) {
- apk_message("%s %s %s (" BLOB_FMT ")",
- status, msg, nameptr,
+ apk_message("%s %s %s" BLOB_FMT " (" BLOB_FMT ")",
+ status, msg,
+ name->name,
+ BLOB_PRINTF(db->repo_tags[change->new_repository_tag].tag),
BLOB_PRINTF(*oneversion));
} else {
- apk_message("%s %s %s (" BLOB_FMT " -> " BLOB_FMT ")",
- status, msg, nameptr,
+ apk_message("%s %s %s" BLOB_FMT " (" BLOB_FMT " -> " BLOB_FMT ")",
+ status, msg,
+ name->name,
+ BLOB_PRINTF(db->repo_tags[change->new_repository_tag].tag),
BLOB_PRINTF(*oldpkg->version),
BLOB_PRINTF(*newpkg->version));
}
@@ -383,7 +376,7 @@ static void print_pinning_errors(struct print_state *ps, struct apk_package *pkg
for (i = 0; i < db->num_repo_tags; i++) {
if (pkg->repos & db->repo_tags[i].allowed_repos) {
label_start(ps, "masked in:");
- apk_print_indented(&ps->i, *db->repo_tags[i].name);
+ apk_print_indented(&ps->i, db->repo_tags[i].tag);
}
}
label_end(ps);