summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-26 13:35:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-26 13:35:45 +0000
commit2d7171b2e7079c099bc4d53fc0ec2f00437976ce (patch)
treeed923ae985fbfca49dd74a6056e08b879d8010ed
parent028990d5760b3d978db7daebfb011385b73fb571 (diff)
parent9f3fbedcc9b45c0d48e222dd52568ced8ca22954 (diff)
downloadapk-tools-2d7171b2e7079c099bc4d53fc0ec2f00437976ce.tar.gz
apk-tools-2d7171b2e7079c099bc4d53fc0ec2f00437976ce.tar.bz2
apk-tools-2d7171b2e7079c099bc4d53fc0ec2f00437976ce.tar.xz
apk-tools-2d7171b2e7079c099bc4d53fc0ec2f00437976ce.zip
Merge branch 'master' into prog
-rw-r--r--src/add.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/add.c b/src/add.c
index 4d31b87..17935c8 100644
--- a/src/add.c
+++ b/src/add.c
@@ -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)