The wrapper script previously did not allow to instantiate templated
services without DefaultInstance defined. This change allows
foo@.service be installed and therefor be in enabled state.
In real systemd land, templated units without a specified instance are
valid, but we restrict it here a bit in order to not have a foo@.service
with:
[Install]
WantedBy=bar.service # bar.service starts -> start foo@???.service
In this case, system can never resolve the specific instance of
foo@.service when bar.service is started. It is fixed by adding the
template_only variable, which restricts the dependents of generic
template units to template-only ones. This means the following is still
legal for the above foo@.service:
[Install]
WantedBy=bar@.service # bar@1.service starts -> start foo@1.service
# bar@2.service starts -> start foo@2.service
# etc...
WantedBy=bas@1.service # bas@1.service starts -> start foo@1.service
# bas@2.service starts -> no dependency here
# etc...
Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.
I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>