chiark / gitweb /
unit: fix complementing of requirement deps with After deps for targets
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 23 Sep 2011 11:58:00 +0000 (13:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Sep 2011 14:28:27 +0000 (16:28 +0200)
'man systemd.target' says:
  Unless DefaultDependencies= is set to false, target units will
  implicitly complement all configured dependencies of type
  Wants=, Requires=, RequiresOverridable= with dependencies of type
  After=  if the units in question also have DefaultDependencies=true.

It did not work because of a forgotten negation.

src/unit.c

index 0b435cb78efdb283b12d5078f2d3ca538eb3a682..903a8e4da4a4ae6731ad2c7b6d3839fa506448a1 100644 (file)
@@ -774,7 +774,7 @@ int unit_add_default_target_dependency(Unit *u, Unit *target) {
         /* If either side wants no automatic dependencies, then let's
          * skip this */
         if (!u->meta.default_dependencies ||
-            target->meta.default_dependencies)
+            !target->meta.default_dependencies)
                 return 0;
 
         /* Don't create loops */