slightly weird use of PACKAGECONFIG in bbappend file?
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?
rday
Quoted 35 lines · Robert P. J. Day
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.
Quoted 5 lines
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,
Quoted 5 lines
rday
Quoted 34 lines · Robert P. J. Day
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.
Quoted 5 lines
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?
I'm on record as strongly suggesting PACKAGECONFIG entries should be in the base recipes, there isn't a good reason I'm aware of not to do that. Obviously the system is very flexible though...
Cheers,
Richard