ryantimwilson / rpms / systemd

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