6.2 Dependencies

At the beginning of the present manual, we have introduced load and remove dependencies. Both can be defined for groups and unit configurations, however only groups can be specified as dependencies, not unit configurations. Load dependencies for an unit configuration are the groups that will be effectively used to generate the systemd unit as explained in previous section, after removing all groups specified as remove dependencies for the same unit configuration.

In practice, dependencies are not transitive, which means that load/remove dependencies of a group are not automatically imported in the unit configuration that specifies that group as dependency. Instead, the specific node used to specify the dependency (pull, replace, merge) together with the inherit property decides which transitive dependencies to import in order to simulate transitiveness.

To show how dependencies are imported, we call host the group/unit configuration that uses one of the previous nodes to declare its dependencies, and target a group that is specified inside one of the previous nodes. Then:

Since there are no transitive dependencies, the needed property is never imported through pull and replace, and inherited only in certain cases by merge.