Bug 14809

Summary: append adds a space when value is ""
Product: [Build System, Metadata & Runtime] BitBake Reporter: akuster <akuster808>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description akuster 2022-05-20 14:52:45 UTC
a) KERNEL_FEATURES=" features/nfsd/nfsd-enable.scc features/debug/printk.scc  cfg/fs/vfat.scc features/kernel-sample/kernel-sample.scc features/netfilter/netfilter.scc cfg/virtio.scc features/drm-bochs/drm-bochs.scc   features/scsi/scsi-debug.scc  features/gpio/mockup.scc   "


b) KERNEL_FEATURES=" features/nfsd/nfsd-enable.scc features/debug/printk.scc  cfg/fs/vfat.scc features/kernel-sample/kernel-sample.scc features/netfilter/netfilter.scc cfg/virtio.scc features/drm-bochs/drm-bochs.scc   features/scsi/scsi-debug.scc  features/gpio/mockup.scc


KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "features/apparmor/apparmor.scc", "" ,d)}"

When this DISTRO FEATURES is not set it appends a space as seen in "a" and changes the signature of the KERNEL_FEATURES variables.
Comment 1 Richard Purdie 2022-05-26 12:49:59 UTC
It would do since you're doing KERNEL_FEATURES:append = " XXX", i.e. there is an unconditional space in there.

Move the space into the conditional, i.e. " features/apparmor/apparmor.scc".