Bug 14809 - append adds a space when value is ""
Summary: append adds a space when value is ""
Status: RESOLVED NOTABUG
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-05-20 14:52 UTC by akuster
Modified: 2022-05-26 12:49 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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".