Skip to contentSkip to conversation

so how does PACKAGECONFIG really work?

DISCUSSION Robert P. J. Day 2 participants 3 messages Nov 2, 2013

lore
Share & tools
lore
#0 lore raw

most of the way thru the variable glossary and this one confuses me.
from here:

http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

we have:

"This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis. PACKAGECONFIG blocks are defined in recipes when you specify features and then arguments that define feature behaviors. Here is the basic block structure:

     PACKAGECONFIG ??= "f1 f2 f3 ..."
     PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
     PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
     PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"

which *seems* to suggest that you must first set PACKAGECONFIG to the list of features, but i see numerous examples that don't seem to obey that condition.

from meta-oe/recipes-extended, this looks good:

gnuplot/gnuplot.inc:PACKAGECONFIG ??= "cairo" gnuplot/gnuplot.inc:PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo pango"

this looks like it's missing a reference to "ftdi":

lcdproc/lcdproc5.inc:PACKAGECONFIG ??= "usb" lcdproc/lcdproc5.inc:PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0" lcdproc/lcdproc5.inc:PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"

and this looks, well, totally wrong (at least according to the
explanation in the manual):

collectd/collectd_5.2.2.bb:PACKAGECONFIG ??= ""
collectd/collectd_5.2.2.bb:PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp" collectd/collectd_5.2.2.bb:PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached" collectd/collectd_5.2.2.bb:PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables" collectd/collectd_5.2.2.bb:PACKAGECONFIG[postgresql] = "--enable-postgresql,--disable-postgresql,postgresql" collectd/collectd_5.2.2.bb:PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi" collectd/collectd_5.2.2.bb:PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus" collectd/collectd_5.2.2.bb:PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs" collectd/collectd_5.2.2.bb:PACKAGECONFIG[sensors] = "--enable-sensors,--disable-sensors,lmsensors"

so ... clarification? oh, and while i'm here, it's easy enough to use
the "bb" utility to print PACKAGECONFIG:

$ bb show -r gnuplot PACKAGECONFIG
Parsing recipes..done.
PACKAGECONFIG="cairo"
$

but is there a way to display the value of PACKAGECONFIG[cairo]? "bb" doesn't seem prepared to do something like that.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 13 lines · Robert P. J. Day

most of the way thru the variable glossary and this one confuses me.
from here:

http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

we have:

"This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis. PACKAGECONFIG blocks are defined in recipes when you specify features and then arguments that define feature behaviors. Here is the basic block structure:

Quoted 8 lines
     PACKAGECONFIG ??= "f1 f2 f3 ..."
     PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
     PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
     PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"

which *seems* to suggest that you must first set PACKAGECONFIG to the list of features, but i see numerous examples that don't seem to obey that condition.

Not all features, but *enabled* features.

Quoted 10 lines

from meta-oe/recipes-extended, this looks good:

gnuplot/gnuplot.inc:PACKAGECONFIG ??= "cairo" gnuplot/gnuplot.inc:PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo pango"

this looks like it's missing a reference to "ftdi":

lcdproc/lcdproc5.inc:PACKAGECONFIG ??= "usb" lcdproc/lcdproc5.inc:PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0" lcdproc/lcdproc5.inc:PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"

It's quite simple, usb is by default enabled, ftdi is by default disabled.

If you want to enable ftdi in your .bbappend or through local.conf you need to add ftdi to PACKAGECONFIG variable.

Quoted 39 lines

and this looks, well, totally wrong (at least according to the
explanation in the manual):

collectd/collectd_5.2.2.bb:PACKAGECONFIG ??= ""
collectd/collectd_5.2.2.bb:PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp" collectd/collectd_5.2.2.bb:PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached" collectd/collectd_5.2.2.bb:PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables" collectd/collectd_5.2.2.bb:PACKAGECONFIG[postgresql] = "--enable-postgresql,--disable-postgresql,postgresql" collectd/collectd_5.2.2.bb:PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi" collectd/collectd_5.2.2.bb:PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus" collectd/collectd_5.2.2.bb:PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs" collectd/collectd_5.2.2.bb:PACKAGECONFIG[sensors] = "--enable-sensors,--disable-sensors,lmsensors"

so ... clarification? oh, and while i'm here, it's easy enough to use
the "bb" utility to print PACKAGECONFIG:

$ bb show -r gnuplot PACKAGECONFIG
Parsing recipes..done.
PACKAGECONFIG="cairo"
$

but is there a way to display the value of PACKAGECONFIG[cairo]? "bb" doesn't seem prepared to do something like that.

rday

Signature · 11 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 19 lines · Martin Jansa
Quoted 18 lines · Robert P. J. Day

most of the way thru the variable glossary and this one confuses me.
from here:

http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

we have:

"This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis. PACKAGECONFIG blocks are defined in recipes when you specify features and then arguments that define feature behaviors. Here is the basic block structure:

     PACKAGECONFIG ??= "f1 f2 f3 ..."
     PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
     PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
     PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"
Quoted 5 lines
Quoted 3 lines

which *seems* to suggest that you must first set PACKAGECONFIG to the list of features, but i see numerous examples that don't seem to obey that condition.

Not all features, but *enabled* features.

ah, gotcha, thanks.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================