]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
seatd: fix packaging error with systemd DISTRO_FEATURES
authorGyorgy Sarvari <skandigraun@gmail.com>
Tue, 10 Jun 2025 09:49:37 +0000 (11:49 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Jun 2025 10:03:40 +0000 (11:03 +0100)
The systemd unit file for this recipe is only installed in case
the target system's init system is systemd. It is achieved by
inspecting the VIRTUAL-RUNTIME_init_manager variable.

However the systemd class was inherited unconditionally. This caused
a failure in do_package task, in case systemd is present in the
DISTRO_FEATURES but the system's init manager is sysvinit: in this case
the systemd unit file is not installed, however systemd.bbclass is
still trying to register is as a startup service. At this point
it failed:

ERROR: seatd-0.9.1-r0 do_package: Didn't find service unit 'seatd.service', specified in SYSTEMD_SERVICE:seatd.

To avoid this, install the systemd unit file unconditionally, regardless
of the used init system.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/seatd/seatd_0.9.1.bb

index 87e1c3b67d69ba29cfde14caf17e3a2010046eac..3b4b3bae4c513f0f3effe897f9852648d5674d35 100644 (file)
@@ -35,9 +35,8 @@ PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd"
 do_install:append() {
         if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
                 install -Dm755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/seatd
-        else
-                install -Dm644 ${S}/contrib/systemd/seatd.service ${D}${systemd_unitdir}/system/seatd.service
         fi
+        install -Dm644 ${S}/contrib/systemd/seatd.service ${D}${systemd_unitdir}/system/seatd.service
 }
 
 USERADD_PACKAGES = "${PN}"