solver: ask confirmation in interactive mode only if there's changes

cute-signatures
Timo Teräs 2012-02-28 11:32:26 +02:00
parent c7bd973367
commit ef53dd52c5
1 changed files with 2 additions and 1 deletions

View File

@ -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);