From: Michal Schmidt Date: Fri, 20 Apr 2012 12:44:00 +0000 (+0200) Subject: transaction: add starting requirements for JOB_RESTART X-Git-Tag: v183~232 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=65304075249449a713b4e4842b8538ef4aa1c725;ds=sidebyside transaction: add starting requirements for JOB_RESTART While having a Requires= dependency between units, the dependency is started automatically on "systemctl start", but it's not started on "systemctl restart". JOB_RESTART jobs did not pull the dependencies for starting into the transaction. https://bugzilla.redhat.com/show_bug.cgi?id=802770 Note that the other bug noted in comment #2 has been fixed already by avoiding the deletion of anchor jobs. --- diff --git a/src/core/transaction.c b/src/core/transaction.c index c3e1e1329..a2efcbcff 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -866,7 +866,7 @@ int transaction_add_job_and_dependencies( } /* Finally, recursively add in all dependencies. */ - if (type == JOB_START || type == JOB_RELOAD_OR_START) { + if (type == JOB_START || type == JOB_RELOAD_OR_START || type == JOB_RESTART) { SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUIRES], i) { r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, override, false, false, ignore_order, e); if (r < 0) {