[systemd-devel] [PATCH] Drop Before=paths/sockets/timers.target from DefaultDependencies.
Andrey Borzenkov
arvidjaar at gmail.com
Wed Jan 29 07:37:04 PST 2014
В Wed, 29 Jan 2014 10:16:06 +0100
Thomas Bächler <thomas at archlinux.org> пишет:
> Am 29.01.2014 03:49, schrieb Andrey Borzenkov:
> >> Zbyszek's argument for the patch, however, is that following the
> >> recommended WantedBy= behavior already applies the same Before=
> >> dependency,
> >
> > Where is *this* documented? Unless I misunderstand what you say.
>
> The documentation (and code) regarding the sometimes unexpected
> behaviour of DefaultDependencies is scattered in a few places - this
> cost me some time when I first learned how to systemd.
>
> From systemd.unit(5):
> > If true, (the default), a few default dependencies will implicitly be
> > created for the unit. The actual dependencies created depend on the
> > unit type.
>
> Now, it is true that when you look at systemd.service(5) and friends,
> there is no mention of this implicit Before= dependency mentioned above.
> Even when you look at the code, you won't find it directly.
>
> Eventually, you'll find this bit in systemd.target(5):
> > 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
>
Ah! of course. Thank you. Somehow amount of documentation in systemd
may also become a disadvantage :)
> So, in order to understand DefaultDependencies, you need to read the
> related bits in systemd.unit(5), systemd.service(5), systemd.timer(5),
> systemd.socket(5), systemd.path(5), systemd.slice(5), systemd.swap(5)
> and systemd.target(5). The manpages systemd.mount(5) and
> systemd.automount(5) seem to lack any information about default
> dependencies.
>
In theory you need just two of them - for two units in question, for
which you try to understand why they have these specific relations.
> This is really annoying to learn - I'd suggest collecting all this
> information in one place - IMO, it belongs either into systemd.unit(5)
> or into its own manpage.
>
Actually I think having default dependency for a unit type in the man
page for this unit type is logical. May be some magic to auto-generate
cross-reference man page would be nice. Maintaining this manually is
too error prone.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140129/963d24df/attachment.pgp>
More information about the systemd-devel
mailing list