From 833f92ad39beca0e954e91e5764ffc83f8d0c1cf Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Mon, 16 May 2016 17:24:51 +0200 Subject: core: don't log job status message in case job was effectively NOP (#3199) We currently generate log message about unit being started even when unit was started already and job didn't do anything. This is because job was requested explicitly and hence became anchor job of the transaction thus we could not eliminate it. That is fine but, let's not pollute journal with useless log messages. $ systemctl start systemd-resolved $ systemctl start systemd-resolved $ systemctl start systemd-resolved Current state: $ journalctl -u systemd-resolved | grep Started May 05 15:31:42 rawhide systemd[1]: Started Network Name Resolution. May 05 15:31:59 rawhide systemd[1]: Started Network Name Resolution. May 05 15:32:01 rawhide systemd[1]: Started Network Name Resolution. After patch applied: $ journalctl -u systemd-resolved | grep Started May 05 16:42:12 rawhide systemd[1]: Started Network Name Resolution. Fixes #1723 --- src/core/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/transaction.c') diff --git a/src/core/transaction.c b/src/core/transaction.c index d5370b2a14..e06a48a2f1 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -597,7 +597,7 @@ static int transaction_apply(Transaction *tr, Manager *m, JobMode mode) { /* Not invalidating recursively. Avoids triggering * OnFailure= actions of dependent jobs. Also avoids * invalidating our iterator. */ - job_finish_and_invalidate(j, JOB_CANCELED, false); + job_finish_and_invalidate(j, JOB_CANCELED, false, false); } } -- cgit v1.2.3-54-g00ecf