Bug 4325

Summary: Changing DISTRO_FEATURES (remove systemd) causes No keyboard in X when building sysvinit
Product: [Runtime] General Runtime Reporter: Stefan Stanacar <sstncr>
Component: General RuntimeAssignee: Saul Wold <sgw>
Status: VERIFIED NOTABUG QA Contact:
Severity: normal    
Priority: Medium+ CC: richard.purdie
Version: 1.4   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
Whiteboard: Release note for 1.4
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Stefan Stanacar 2013-04-17 08:24:07 UTC
Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-18"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "dylan:61c6a8a93ec76ad4e6d98a06df489c8ae75e39c6"



1 - add to local.conf

DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"

2 - bitbake core-image-sato - mouse and keyboard work in X


3 - remove the lines added to local.conf

4 - bitbake core-image-sato - mouse and keyboard don't work anymore in X

What happens here is that:
- udev-utils package for the systemd image installs udevadm in /bin/udevadm
- udev-utils for a _clean_ build (wipe tmp) with sysvinit installs udevadm in /usr/bin/udevadm
- but when building the second (above) core-image-sato udevadm remains in /bin/udev but in the sysvinit version udevadm is run from /etc/init.d/udev where the path is hardcoded as /usr/bin/udevadm

[stefans@firebird poky]$ grep -ir udevadm *
meta/recipes-core/udev/udev/init:    /usr/bin/udevadm control --env=STARTUP=1
meta/recipes-core/udev/udev/init:            /usr/bin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
meta/recipes-core/udev/udev/init:            (/usr/bin/udevadm settle --timeout=3; /usr/bin/udevadm control --env=STARTUP=)&
meta/recipes-core/udev/udev/init:            /usr/bin/udevadm trigger --action=add
meta/recipes-core/udev/udev/init:            /usr/bin/udevadm settle
meta/recipes-core/udev/udev.inc:FILES_udev-utils = "${bindir}/udevadm"


meta/recipes-core/systemd/systemd/init:    udevadm control --env=STARTUP=1
meta/recipes-core/systemd/systemd/init:            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
meta/recipes-core/systemd/systemd/init:            (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
meta/recipes-core/systemd/systemd/init:            udevadm trigger --action=add
Comment 1 Richard Purdie 2013-04-17 08:43:51 UTC
Ross gave a pretty good explaintion of this. The issue is the package overlap between the systemd and the udev recipes. When you remove systemd from DISTRO_FEATURES, not all the packages from systemd get removed from the sysroot and this breaks things.

We have *never* claimed to support changing DISTRO_FEATURES on an existing build directory so this use case is not supported. We should however release note it.

Its possible the changes needed for 4102 may allow this usecase to work better too but this is 1.5 enhancement material.
Comment 2 Saul Wold 2013-06-27 15:07:58 UTC
This is not a supported use case!
Comment 3 Stefan Stanacar 2013-10-07 13:34:29 UTC
.