Skip to content

Commit

Permalink
Multi-repo operations skip bad repo
Browse files Browse the repository at this point in the history
When running an operation that should run in all the 3rd-party repos
installed, if one repo fails to set up, the process is aborted and the
operation is never performed in the repos after the failed repo.

This PR changes the proces so if one repo fails to set up it is just
skipped so the operation is attempted in the other repos.

Signed-off-by: Castulo Martinez <[email protected]>
  • Loading branch information
castulo authored and Otavio Pontes committed Feb 28, 2020
1 parent bca954e commit 5b1250d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/3rd_party_repos.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,18 @@ enum swupd_code third_party_run_operation_multirepo(const char *repo, process_bu
for (iter = repos; iter; iter = iter->next) {
selected_repo = iter->data;

/* set the repo's header */
third_party_repo_header(selected_repo->name);

/* set the appropriate variables for the selected 3rd-party repo */
ret = third_party_set_repo(selected_repo, globals.sigcheck);
if (ret) {
/* if one repo failed to set up, we can still try the rest of
* the repos, but keep the error */
ret_code = ret;
goto clean_and_exit;
continue;
}

/* set the repo's header */
third_party_repo_header(selected_repo->name);

ret = process_bundle_fn(NULL);
if (ret != expected_ret_code) {
/* if the operation failed in any of the repos,
Expand Down

0 comments on commit 5b1250d

Please sign in to comment.