RFE: add 'LAYERDIR_<layer>' variable
Hi,
currently, it is difficult to reuse recipes from other layers because their path is required but not known. E.g. when one tries to add a backported imx-gpu-viv recipe [1] to a local layer by
| require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
do_fetch() will fail because some SRC_URI can not be resolved. To support this, FILESEXTRAPATHS must contain the path of the original recipe.
Determining this path is difficult at the moment, because it is unknown and depends on the layout of BBLAYERS.
I suggest to add a new standard variable 'LAYERDIR_<layer>' which points to '${LAYERDIR}' of the layer. It is probably difficult to set it automatically (value of <layer> is not known); instead of, it must be defined manually in 'layer.conf' like related variables.
E.g.
| BBFILE_COLLECTIONS += "freescale-layer"
| BBFILE_PATTERN_freescale-layer := "^${LAYERDIR}/"
|
| LAYERDIR_freescale-layer := "${LAYERDIR}" <<<<<<<<<<Diagnostic should be easy (iterate over BBFILE_COLLECTIONS and emit warning when corresponding 'LAYERDIR_<layer>' is undefined).
What do you think?
Enrico
Footnotes:
[1] https://github.com/Freescale/meta-freescale/blob/master/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p1.0-aarch64.bb
I would generally not want to encourage reuse of recipes this way. If I have something in my layer I want freedom to change it as I please, and I don't want to hear complaints that I 'broke' layers I have never heard about because those layers include bits and pieces of my recipes. If you want reuse, put the reusable bits into .bbclass.
Alex
Quoted 49 lines · Enrico Scholz via lists.openembedded.org
Hi,
currently, it is difficult to reuse recipes from other layers because their path is required but not known. E.g. when one tries to add a backported imx-gpu-viv recipe [1] to a local layer by
| require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
do_fetch()will fail because someSRC_URIcan not be resolved. To support this, FILESEXTRAPATHS must contain the path of the original recipe.Determining this path is difficult at the moment, because it is unknown and depends on the layout of BBLAYERS.
I suggest to add a new standard variable 'LAYERDIR_<layer>' which points to '${LAYERDIR}' of the layer. It is probably difficult to set it automatically (value of <layer> is not known); instead of, it must be defined manually in 'layer.conf' like related variables.
E.g.
| BBFILE_COLLECTIONS += "freescale-layer" | BBFILE_PATTERN_freescale-layer := "^${LAYERDIR}/" | | LAYERDIR_freescale-layer := "${LAYERDIR}" <<<<<<<<<<Diagnostic should be easy (iterate over
BBFILE_COLLECTIONSand emit warning when corresponding 'LAYERDIR_<layer>' is undefined).What do you think?
Enrico
Footnotes:
[1] https://github.com/Freescale/meta-freescale/blob/master/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p1.0-aarch64.bb-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184185): https://lists.openembedded.org/g/openembedded-core/message/184185
Mute This Topic: https://lists.openembedded.org/mt/100097753/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-