diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-04-24 11:21:03 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-04-23 08:13:02 +0200 |
commit | 5273510e9f228a300ec6207d4502f1c6253aed5e (patch) | |
tree | 4900160e4f48db419d8346424da1a0b7b09a777a /src/core/transaction.c | |
parent | 39a18c60d07319ebfcfd476556729c2cadd616d6 (diff) |
transaction: cancel jobs non-recursively on isolate
Recursive cancellation of jobs would trigger OnFailure actions of
dependent jobs. This is not desirable when isolating.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=798328
Diffstat (limited to 'src/core/transaction.c')
-rw-r--r-- | src/core/transaction.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c index 8b4116806b..aee155f519 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -546,18 +546,16 @@ static int transaction_apply(Transaction *tr, Manager *m, JobMode mode) { /* When isolating first kill all installed jobs which * aren't part of the new transaction */ - rescan: HASHMAP_FOREACH(j, m->jobs, i) { assert(j->installed); if (hashmap_get(tr->jobs, j->unit)) continue; - /* 'j' itself is safe to remove, but if other jobs - are invalidated recursively, our iterator may become - invalid and we need to start over. */ - if (job_finish_and_invalidate(j, JOB_CANCELED) > 0) - goto rescan; + /* Not invalidating recursively. Avoids triggering + * OnFailure= actions of dependent jobs. Also avoids + * invalidating our iterator. */ + job_finish_and_invalidate(j, JOB_CANCELED, false); } } |