diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-26 12:52:35 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-26 12:57:06 +0000 |
commit | 9f3fbedcc9b45c0d48e222dd52568ced8ca22954 (patch) | |
tree | fa8ed55d2f96a11f7db01ca9d51eb03de941a99a | |
parent | 3f9fe4c28be7987bd404f06e27ed03aafd8e8b52 (diff) | |
download | apk-tools-9f3fbedcc9b45c0d48e222dd52568ced8ca22954.tar.gz apk-tools-9f3fbedcc9b45c0d48e222dd52568ced8ca22954.tar.bz2 apk-tools-9f3fbedcc9b45c0d48e222dd52568ced8ca22954.tar.xz apk-tools-9f3fbedcc9b45c0d48e222dd52568ced8ca22954.zip |
add: print all failing packages instead of only first
We want see all packages that fails to install and not only the first
-rw-r--r-- | src/add.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -63,7 +63,7 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) struct apk_package *virtpkg = NULL; struct apk_dependency virtdep; struct apk_dependency *deps; - int i, r = 0, num_deps = 0; + int i, r = 0, num_deps = 0, errors = 0; if (actx->virtpkg) { if (non_repository_check(db)) @@ -136,10 +136,12 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) } else { apk_error("Unable to install '%s': %d", deps[i].name->name, r); - if (!(apk_flags & APK_FORCE)) - goto err; + errors++; } } + if (errors && !(apk_flags & APK_FORCE)) + goto err; + r = apk_state_commit(state, db); err: if (state != NULL) |