mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-07 14:11:52 +00:00
Fix output message in bundle-add
There is a bug in bundle-add that causes the wrong output message to be shown when a bundle fails to be installed due to not being able to download a file that is part of the bundle. This commit fixes the logic so messages are shown correctly. Fixes #511
This commit is contained in:
committed by
Matthew Johnson
parent
0382e8d064
commit
a42c5504e7
+8
-1
@@ -937,7 +937,14 @@ out:
|
||||
}
|
||||
|
||||
/* print totals */
|
||||
bundles_failed = bundles_requested - bundles_installed - already_installed;
|
||||
if (ret && bundles_installed != 0) {
|
||||
/* if this point is reached with a nonzero return code and bundles_installed=0 it means that
|
||||
* while trying to install the bundles some error occurred which caused the whole installation
|
||||
* process to be aborted, so none of the bundles got installed. */
|
||||
bundles_failed = bundles_requested - already_installed;
|
||||
} else {
|
||||
bundles_failed = bundles_requested - bundles_installed - already_installed;
|
||||
}
|
||||
if (bundles_failed > 0) {
|
||||
ret = EBUNDLE_INSTALL;
|
||||
fprintf(stderr, "Failed to install %i of %i bundles\n", bundles_failed, bundles_requested - already_installed);
|
||||
|
||||
Reference in New Issue
Block a user