summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-28 11:32:26 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-28 11:32:39 +0200
commitef53dd52c54e1b8ff52a5bd2373f31c1709cbbee (patch)
tree578336b5b3751cd652bb8aed550b3f891dfaad8a /src/solver.c
parentc7bd973367ee5acfda7875ae4ab65ea5f1789900 (diff)
downloadapk-tools-ef53dd52c54e1b8ff52a5bd2373f31c1709cbbee.tar.gz
apk-tools-ef53dd52c54e1b8ff52a5bd2373f31c1709cbbee.tar.bz2
apk-tools-ef53dd52c54e1b8ff52a5bd2373f31c1709cbbee.tar.xz
apk-tools-ef53dd52c54e1b8ff52a5bd2373f31c1709cbbee.zip
solver: ask confirmation in interactive mode only if there's changes
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/solver.c b/src/solver.c
index a20b25b..b50380b 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1867,7 +1867,8 @@ int apk_solver_commit_changeset(struct apk_database *db,
"disk space will be freed." :
"additional disk space will be used.");
}
- if (apk_flags & APK_INTERACTIVE) {
+ if (changeset->changes->num > 0 &&
+ (apk_flags & APK_INTERACTIVE)) {
printf("Do you want to continue [Y/n]? ");
fflush(stdout);
r = fgetc(stdin);