Re: slightly weird use of PACKAGECONFIG in bbappend file?


Khem Raj
 

On Sun, Oct 18, 2020 at 11:32 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:


currently updating lots of YP class notes, and writing a short
section on "coding style", and ran across the following oddity(?)
related to PACKAGECONFIG (all on master branches).

i noticed in oe-core, qemu.inc:

PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"

fair enough, that defines a setting for "spice" related to qemu.
however, for reasons that would make no sense to anyone but me, i
ended up at meta-cloud-services/meta-openstack/qemu_5.%.bbappend,
which conditionally requires qemu-openstack.inc, which contains:

/// start

PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice,"
PACKAGECONFIG[libseccomp] = "--enable-seccomp,--disable-seccomp,libseccomp,libseccomp"

PACKAGECONFIG ?= "fdt virtfs libcap-ng"
PACKAGECONFIG_x86 ?= "fdt spice virtfs libcap-ng"
PACKAGECONFIG_x86-64 ?= "fdt spice virtfs libcap-ng"

PACKAGECONFIG_class-native = "fdt"
PACKAGECONFIG_class-nativesdk = "fdt"

/// end

i have no problem with a recipe bbappend file selecting or
deselecting PACKAGECONFIG settings, but it looks just weird for a
bbappend file to define *new* PACKAGECONFIG settings -- that would
seem to be a property restricted to the base .bb recipe file for any
recipe.

so in the above meta-openstack file, the line related to "spice" is
clearly redundant, but the line related to "libseccomp" just looks
weird as that should be defined in the qemu base recipe, no?

or am i misunderstanding something again?

there is no such hard and fast rule. Should all packageconfig knobs be in
main recipe, perhaps a good practice but not necessary,

rday


Join yocto@lists.yoctoproject.org to automatically receive all group messages.