teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame 0001-unit-fix-complementing-of-requirement-deps-with-Afte.patch

Michal Schmidt a762e5
From a65cb51f29ee177f6f800c87232b68475216a418 Mon Sep 17 00:00:00 2001
Michal Schmidt a762e5
From: Michal Schmidt <mschmidt@redhat.com>
Michal Schmidt a762e5
Date: Fri, 23 Sep 2011 13:58:00 +0200
Michal Schmidt a762e5
Subject: [PATCH] unit: fix complementing of requirement deps with After deps
Michal Schmidt a762e5
 for targets
Michal Schmidt a762e5
Michal Schmidt a762e5
'man systemd.target' says:
Michal Schmidt a762e5
  Unless DefaultDependencies= is set to false, target units will
Michal Schmidt a762e5
  implicitly complement all configured dependencies of type
Michal Schmidt a762e5
  Wants=, Requires=, RequiresOverridable= with dependencies of type
Michal Schmidt a762e5
  After=  if the units in question also have DefaultDependencies=true.
Michal Schmidt a762e5
Michal Schmidt a762e5
It did not work because of a forgotten negation.
Michal Schmidt a762e5
---
Michal Schmidt a762e5
 src/unit.c |    2 +-
Michal Schmidt a762e5
 1 files changed, 1 insertions(+), 1 deletions(-)
Michal Schmidt a762e5
Michal Schmidt a762e5
diff --git a/src/unit.c b/src/unit.c
Michal Schmidt a762e5
index 0b435cb..903a8e4 100644
Michal Schmidt a762e5
--- a/src/unit.c
Michal Schmidt a762e5
+++ b/src/unit.c
Michal Schmidt a762e5
@@ -774,7 +774,7 @@ int unit_add_default_target_dependency(Unit *u, Unit *target) {
Michal Schmidt a762e5
         /* If either side wants no automatic dependencies, then let's
Michal Schmidt a762e5
          * skip this */
Michal Schmidt a762e5
         if (!u->meta.default_dependencies ||
Michal Schmidt a762e5
-            target->meta.default_dependencies)
Michal Schmidt a762e5
+            !target->meta.default_dependencies)
Michal Schmidt a762e5
                 return 0;
Michal Schmidt a762e5
 
Michal Schmidt a762e5
         /* Don't create loops */
Michal Schmidt a762e5
-- 
Michal Schmidt a762e5
1.7.4.4
Michal Schmidt a762e5