Merging Packages from OpenEmbedded: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Created page with 'The below are some stylistic guidelines to be aware of when importing recipes from OpenEmbedded. Note: please be sure to '''always''' attribute OpenEmbedded when you take a recip…')
 
(Update and remove obsolete items, add a link to the OE migration guide)
 
Line 1: Line 1:
The below are some stylistic guidelines to be aware of when importing recipes from OpenEmbedded.
The below are some stylistic guidelines to be aware of when importing recipes from OpenEmbedded (Classic).
Note: please be sure to '''always''' attribute OpenEmbedded when you take a recipe from there, even if it is changed heavily. Something like ''based on recipe from OE'' in your commit message should suffice.
Note: please be sure to '''always''' attribute OpenEmbedded when you take a recipe from there, even if it is changed heavily. Something like ''based on recipe from OE-Classic'' in your commit message should suffice.


* Consistent whitespace throughout the file
* Consistent whitespace throughout the file
* File follows a roughly standard variable order
* File follows a roughly standard variable order
* Patches are all documented
* Patches are all documented
* No legacy staging
* Use BBCLASSEXTEND where possible instead of -native / -nativesdk versions
** where recipe has a custom do_stage function remove is and ensure its do_install covers everything the do_stage did
* Use BBCLASSEXTEND where possible instead of -native versions
* No -sdk or -nativesdk packages, use BBCLASSEXTEND
* pkgconfig .pc files are correct and don't need manual mangling
* pkgconfig .pc files are correct and don't need manual mangling
** if its using pkgconfig.bbclass ensure the .pc files are correct, may need a patch. Sure sign is the .pc files have long paths in including the WORKDIR or sysroot paths. They should just have references like "/usr/lib/", i.e. target system paths and pkgconfig will automatically add in the correct sysroot paths as needed.
** if its using pkgconfig.bbclass ensure the .pc files are correct, may need a patch. Sure sign is the .pc files have long paths in including the WORKDIR or sysroot paths. They should just have references like "/usr/lib/", i.e. target system paths and pkgconfig will automatically add in the correct sysroot paths as needed.
Line 14: Line 11:
* Use "make install" where at all possible
* Use "make install" where at all possible
* Remove any BBVERSIONS lines
* Remove any BBVERSIONS lines
* Use RDEPENDS_pacakgename rather than RDEPENDS (same for RRECOMMENDS)
* Poky generally avoids INC_PR
* Poky uses a separate file for hashes rather than having them embedded in the recipe, this may be something we want to adopt but is not the current state of play.
* Use ALTERNATIVE_* Recipe metadata instead of update-alternatives command
* Use ALTERNATIVE_* Recipe metadata instead of update-alternatives command
For more practical information on migrating recipes see '''[http://www.openembedded.org/wiki/Migrating_metadata_to_OE-Core Migrating metadata to OE-Core]''' over at the OE wiki.

Latest revision as of 11:13, 5 June 2014

The below are some stylistic guidelines to be aware of when importing recipes from OpenEmbedded (Classic). Note: please be sure to always attribute OpenEmbedded when you take a recipe from there, even if it is changed heavily. Something like based on recipe from OE-Classic in your commit message should suffice.

  • Consistent whitespace throughout the file
  • File follows a roughly standard variable order
  • Patches are all documented
  • Use BBCLASSEXTEND where possible instead of -native / -nativesdk versions
  • pkgconfig .pc files are correct and don't need manual mangling
    • if its using pkgconfig.bbclass ensure the .pc files are correct, may need a patch. Sure sign is the .pc files have long paths in including the WORKDIR or sysroot paths. They should just have references like "/usr/lib/", i.e. target system paths and pkgconfig will automatically add in the correct sysroot paths as needed.
  • No custom do_configure for autotooled projects
  • Use "make install" where at all possible
  • Remove any BBVERSIONS lines
  • Use ALTERNATIVE_* Recipe metadata instead of update-alternatives command

For more practical information on migrating recipes see Migrating metadata to OE-Core over at the OE wiki.