mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-07 14:11:52 +00:00
update: Don't abort on errors on check_manifests_uniqueness()
On error, return an error code instead of aborting. And handle error on function call.
This commit is contained in:
committed by
Matthew Johnson
parent
fe906d2b73
commit
da16c15f0e
+5
-2
@@ -65,7 +65,7 @@ static int check_manifests_uniqueness(int clrver, int mixver)
|
||||
|
||||
if (clearfull == NULL || mixerfull == NULL) {
|
||||
fprintf(stderr, "Could not convert full manifest to array\n");
|
||||
abort();
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ret = enforce_compliant_manifest(mixerfull, clearfull, mixer->filecount, clear->filecount);
|
||||
@@ -282,12 +282,15 @@ version_check:
|
||||
// new mix version
|
||||
check_mix_versions(&mix_current_version, &mix_server_version, path_prefix);
|
||||
ret = check_manifests_uniqueness(server_version, mix_server_version);
|
||||
if (ret) {
|
||||
if (ret > 0) {
|
||||
printf("\n\t!! %i collisions were found between mix and upstream, please re-create mix !!\n", ret);
|
||||
if (!allow_mix_collisions) {
|
||||
ret = EXIT_FAILURE;
|
||||
goto clean_curl;
|
||||
}
|
||||
} else if (ret < 0) {
|
||||
ret = EXIT_FAILURE;
|
||||
goto clean_curl;
|
||||
}
|
||||
|
||||
goto version_check;
|
||||
|
||||
Reference in New Issue
Block a user