Bug 3327 - [DOC] No documentation for PACKAGECONFIG
Summary: [DOC] No documentation for PACKAGECONFIG
Status: VERIFIED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 1.4
Assignee: Ross Burton
QA Contact:
URL: http://git.yoctoproject.org/cgit.cgi/...
Whiteboard: 03 Dec 2012 - Review edits applied
Depends on:
Blocks:
 
Reported: 2012-10-23 15:52 UTC by Ross Burton
Modified: 2013-03-14 10:35 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2012-10-23 15:52:53 UTC
The PACKAGECONFIG variable available in recipes is complicated, non-obvious, and super useful.  It should be documented!
Comment 1 Jessica 2012-10-25 14:50:48 UTC
Ross,

It'll be great if you can provide the technical content for Scott.

Thanks,
Jessica
Comment 2 Ross Burton 2012-10-26 09:48:48 UTC
Sure.  For future reference I'll paste the log of how I (badly) explained to Mihai Prica yesterday:

ross@otcchat.org: i'll give you a link to an example, but you need to understand the theory
ross@otcchat.org: basically it selectively adds to EXTRA_OECONF, DEPENDS and RDEPENDS
ross@otcchat.org: you have a set of packageconfig "options"
ross@otcchat.org: PACKAGCONFIG[foo] = "--enable-foo,--disable-foo,libfoo"
ross@otcchat.org: which says when foo is on, ad --enable-foo to EXTRA_OECONF
ross@otcchat.org: if its off, pass --disable-foo
ross@otcchat.org: (for deterministic builds)
ross@otcchat.org: and libfoo is added to DEPENDS
ross@otcchat.org: (you can add another section to add runtime depends)
ross@otcchat.org: you have one of those for each option
ross@otcchat.org: then you set PACKAGECONFIG itself
ross@otcchat.org: using ??= so it's easily overridden
ross@otcchat.org: to the value of the options which you want on by default
ross@otcchat.org: mesa-common.inc is a complex example
ross@otcchat.org: the set of options changes depending on distro features and machine
ross@otcchat.org: it's split between mesa-common.inc and mesa-dri.inc
Comment 3 Paul Eggleton 2012-11-12 15:29:43 UTC
Scott has added this to the variable reference already for 1.3:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG
Comment 4 Ross Burton 2012-11-12 15:32:33 UTC
There is a fourth option in the PACKAGECONFIG[foo] lines: RDEPENDS to add if the option is enabled.
Comment 5 Scott Rifenbark 2012-11-16 00:58:44 UTC
Ross, 

What do you mean in Comment 4?  Please look at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG and tell me where the description is lacking.  That would be the most helpful for me. 

Thanks, 
Scott
Comment 6 Scott Rifenbark 2012-11-20 21:31:56 UTC
Ross, 

I still don't get this.  I will need some more hand-holding from you to understand how this works.  If you get a chance, maybe you can provide more explanation for me.

Thanks, 
Scott
Comment 7 Paul Eggleton 2012-11-27 15:32:20 UTC
Seems I missed the fourth parameter since it is not often used. I would modify the PACKAGECONFIG entry as follows:

...while the named flags set on the variable specify for each feature, separated by commas, in order:
 1) extra arguments that should be added to the configure script argument list (EXTRA_OECONF) if the feature is enabled
 2) extra arguments that should be added to EXTRA_OECONF if the feature is disabled
 3) additional build dependencies (DEPENDS) that should be added if the feature is enabled
 4) additional runtime dependencies (RDEPENDS) that should be added if the feature is enabled. 

Any of these values can be left blank if not needed.
...
Comment 8 Scott Rifenbark 2012-11-29 23:43:37 UTC
This description has been re-written and reviewed by Paul Eggleton.  I am marking RESOLVED.  

You can see the new version at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG.

Scott
Comment 9 Scott Rifenbark 2012-12-04 00:09:06 UTC
I updated the glossary description for PACKAGECONFIG based on Paul Eggletons review comments.  You can see the final at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG.

Scott
Comment 10 Alexandru Georgescu 2013-03-14 10:35:04 UTC
Verified as per last comment