diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-28 18:51:42 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-28 18:51:42 +0100 |
commit | 75a77a6ba4dbccd3e8d002f5efd3f714e1b49de2 (patch) | |
tree | 2b4e927cce0ccaedafd38cdfa9efe633399fd6f9 /src/core | |
parent | f0469b8c4abbeee9ca69678245cd08314adc24c0 (diff) |
core: when propagating reload jobs, downgrade them to try-reload
Otherwise we might end up generating jobs that fail immediately.
This follows the same logic that restart propagation follows.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/transaction.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c index 8b0ed74643..0d53e4bac0 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -1010,7 +1010,13 @@ int transaction_add_job_and_dependencies( if (type == JOB_RELOAD) { SET_FOREACH(dep, ret->unit->dependencies[UNIT_PROPAGATES_RELOAD_TO], i) { - r = transaction_add_job_and_dependencies(tr, JOB_RELOAD, dep, ret, false, false, false, ignore_order, e); + JobType nt; + + nt = job_type_collapse(JOB_TRY_RELOAD, dep); + if (nt == JOB_NOP) + continue; + + r = transaction_add_job_and_dependencies(tr, nt, dep, ret, false, false, false, ignore_order, e); if (r < 0) { log_unit_warning(dep, "Cannot add dependency reload job, ignoring: %s", |