summaryrefslogtreecommitdiff
path: root/src/upgrade.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-06-01 11:49:32 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-06-01 11:49:32 +0300
commit038b672061919296b68b83a1ccead9c31b650c6c (patch)
tree277f16e61f937139d61e36b2d7b468ddbb87f536 /src/upgrade.c
parent2165547badcc26be1a0fcb2944f11c0bfea25d8a (diff)
downloadapk-tools-038b672061919296b68b83a1ccead9c31b650c6c.tar.gz
apk-tools-038b672061919296b68b83a1ccead9c31b650c6c.tar.bz2
apk-tools-038b672061919296b68b83a1ccead9c31b650c6c.tar.xz
apk-tools-038b672061919296b68b83a1ccead9c31b650c6c.zip
state: improve error messages from dependency failures
Print more information why installation changeset calculation failed. Fixes #187.
Diffstat (limited to 'src/upgrade.c')
-rw-r--r--src/upgrade.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/upgrade.c b/src/upgrade.c
index 879e14c..611f677 100644
--- a/src/upgrade.c
+++ b/src/upgrade.c
@@ -46,14 +46,12 @@ static int upgrade_main(void *ctx, struct apk_database *db, int argc, char **arg
dep->result_mask = APK_VERSION_EQUAL | APK_VERSION_LESS | APK_VERSION_GREATER;
dep->version = NULL;
}
- r = apk_state_lock_dependency(state, dep);
- if (r != 0) {
- apk_error("Unable to upgrade '%s'",
- dep->name->name);
- goto err;
- }
+ r |= apk_state_lock_dependency(state, dep);
}
- r = apk_state_commit(state, db);
+ if (r == 0)
+ r = apk_state_commit(state, db);
+ else
+ apk_state_print_errors(state);
err:
if (state != NULL)
apk_state_unref(state);