daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
923a60
From b5ed9900d9a02abd78bfb151932748725b7c0bdb Mon Sep 17 00:00:00 2001
923a60
From: Lennart Poettering <lennart@poettering.net>
923a60
Date: Thu, 21 May 2015 20:39:23 +0200
923a60
Subject: [PATCH] core: properly handle jobs that are suppressed to JOB_NOPs
923a60
 when propagating restarts
923a60
923a60
Cherry-picked from: 48894cd0
923a60
Resolves: #1436021
923a60
---
923a60
 src/core/transaction.c | 7 ++++++-
923a60
 1 file changed, 6 insertions(+), 1 deletion(-)
923a60
923a60
diff --git a/src/core/transaction.c b/src/core/transaction.c
923a60
index 34df15718b..66bbb60665 100644
923a60
--- a/src/core/transaction.c
923a60
+++ b/src/core/transaction.c
923a60
@@ -1023,8 +1023,13 @@ int transaction_add_job_and_dependencies(
923a60
 
923a60
                         for (j = 0; j < ELEMENTSOF(propagate_deps); j++)
923a60
                                 SET_FOREACH(dep, ret->unit->dependencies[propagate_deps[j]], i) {
923a60
+                                        JobType nt;
923a60
 
923a60
-                                        r = transaction_add_job_and_dependencies(tr, job_type_collapse(ptype, dep), dep, ret, true, override, false, false, ignore_order, e);
923a60
+                                        nt = job_type_collapse(ptype, dep);
923a60
+                                        if (nt == JOB_NOP)
923a60
+                                                continue;
923a60
+
923a60
+                                        r = transaction_add_job_and_dependencies(tr, nt, dep, ret, true, override, false, false, ignore_order, e);
923a60
                                         if (r < 0) {
923a60
                                                 if (r != -EBADR)
923a60
                                                         goto fail;