*.bbappend: don't expand FILESEXTRAPATHS immediately
PATCH 1/1 *.bbappend: don't expand FILESEXTRAPATHS immediately
There's no point to expand FILESEXTRAPATHS immediately, since the place where it's referenced still use normal getVar(FILESEXTRAPATHS, d, True). This way it doesn't help anything except adding one more breaking variable on sstate.
--- documentation/bsp-guide/bsp.xml | 2 +- .../recipes/formfactor/formfactor_0.0.bbappend | 2 +- .../recipes/linux/linux-yocto_git.bbappend | 2 +- meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
documentation/bsp-guide/bsp.xml +1 -1
@@ -307,7 +307,7 @@ meta-bsp/packages/image-creator/image-creator-native_0.1.bb The example below shows extra files contained in a folder called ${PN} (the package name). </para> <programlisting> -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" </programlisting> <para> This technique allows the BSP to add machine-specific configuration files to the layer directory,
meta-emenlow/recipes/formfactor/formfactor_0.0.bbappend +1 -1
@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" PRINC = "1"
meta-emenlow/recipes/linux/linux-yocto_git.bbappend +1 -1
@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" COMPATIBLE_MACHINE_emenlow = "emenlow" KMACHINE_emenlow = "emenlow"
meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend +1 -1
@@ -1,3 +1,3 @@ -FILESPATH := "${FILESPATH}:${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESEXTRAPATH = "${THISDIR}/${PN}" SRC_URI += "file://defconfig" COMPATIBLE_MACHINE_emenlow = "emenlow"
Signature · 1 line
1.6.0.4
Please hold on taking this patch.
Josh mentioned to me that below change is risky given below comment in base.bbclass:
# THISDIR only works properly with imediate expansion as it has to run
# in the context of the location its used (:=)
THISDIR = "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"The comment seems controversial to the actual assignment. When trying to understand the trick behind, I decide using a simple alternative by including FILESEXTRAPATHS in BB_BASEHASH_WHITELIST directly
An updated pull request will be sent out soon.
Thanks
Kevin
Quoted 62 lines
From: Tian, Kevin
Sent: Wednesday, November 24, 2010 12:27 PMThere's no point to expand FILESEXTRAPATHS immediately, since the place where it's referenced still use normal
getVar(FILESEXTRAPATHS, d, True). This way it doesn't help anything except adding one more breaking variable on sstate.Signed-off-by Kevin Tian <[email protected]>---
documentation/bsp-guide/bsp.xml | 2 +- .../recipes/formfactor/formfactor_0.0.bbappend | 2 +- .../recipes/linux/linux-yocto_git.bbappend | 2 +- meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)documentation/bsp-guide/bsp.xml +0
-0@@ -307,7 +307,7 @@ meta-bsp/packages/image-creator/image-creator-native_0.1.bb The example below shows extra files contained in a folder called ${PN} (thepackage name).
</para> <programlisting>documentation/bsp-guide/bsp.xml +1
-1-FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" </programlisting> <para> This technique allows the BSP to add machine-specific configuration files to thelayer directory,
meta-emenlow/recipes/formfactor/formfactor_0.0.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}"PRINC = "1"
meta-emenlow/recipes/linux/linux-yocto_git.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}"
COMPATIBLE_MACHINE_emenlow= "emenlow"KMACHINE_emenlow= "emenlow"meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESPATH := "${FILESPATH}:${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESEXTRAPATH = "${THISDIR}/${PN}"
SRC_URI+= "file://defconfig"COMPATIBLE_MACHINE_emenlow= "emenlow"
--
1.6.0.4
Quoted 3 lines · Kevin Tian
There's no point to expand FILESEXTRAPATHS immediately, since the place where it's referenced still use normal
getVar(FILESEXTRAPATHS, d, True). This way it doesn't help anything except adding one more breaking variable on sstate.
There is a very significant reason for doing immediate expansion with these variables.
The := ensures that the expansion happens in the context of the current file. Look at the value of
bitbake formfactor -e | grep ^FILESEXTRAPATH
before and after this patch and you'll see what I mean. It ensures the directory containing the bbappend is searched for source files as well as the directory containing the .bb file.
Cheers,
Richard
Quoted 48 lines
Signed-off-by Kevin Tian <[email protected]>--- documentation/bsp-guide/bsp.xml | 2 +- .../recipes/formfactor/formfactor_0.0.bbappend | 2 +- .../recipes/linux/linux-yocto_git.bbappend | 2 +- meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)documentation/bsp-guide/bsp.xml +1
-1@@ -307,7 +307,7 @@ meta-bsp/packages/image-creator/image-creator-native_0.1.bb The example below shows extra files contained in a folder called ${PN} (the package name). </para> <programlisting> -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" </programlisting> <para> This technique allows the BSP to add machine-specific configuration files to the layer directory,meta-emenlow/recipes/formfactor/formfactor_0.0.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" PRINC = "1"meta-emenlow/recipes/linux/linux-yocto_git.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" COMPATIBLE_MACHINE_emenlow = "emenlow" KMACHINE_emenlow = "emenlow"meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESPATH := "${FILESPATH}:${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESEXTRAPATH = "${THISDIR}/${PN}" SRC_URI += "file://defconfig" COMPATIBLE_MACHINE_emenlow = "emenlow"
Quoted 11 lines
From: Richard Purdie [mailto:[email protected]]
Sent: Thursday, November 25, 2010 5:48 AMQuoted 3 lines · Kevin Tian
There's no point to expand FILESEXTRAPATHS immediately, since the place where it's referenced still use normal
getVar(FILESEXTRAPATHS, d, True). This way it doesn't help anything except adding one more breaking variable on sstate.There is a very significant reason for doing immediate expansion with these variables.
Quoted 8 lines
The := ensures that the expansion happens in the context of the current file. Look at the value of
bitbake formfactor -e | grep ^FILESEXTRAPATH
before and after this patch and you'll see what I mean. It ensures the directory containing the bbappend is searched for source files as well as the directory containing the .bb file.
Good to know that. Interesting thing is why with this change there's no error exposed. :/
Anyway, Josh also reminded me about this and I've sent out an updated one not touching above sensitive places. :-)
Thanks
Kevin
Quoted 62 lines
Cheers,
Richard
documentation/bsp-guide/bsp.xml
Quoted 13 lines
Signed-off-by Kevin Tian <[email protected]>--- documentation/bsp-guide/bsp.xml | 2 +- .../recipes/formfactor/formfactor_0.0.bbappend | 2 +- .../recipes/linux/linux-yocto_git.bbappend | 2 +- meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)documentation/bsp-guide/bsp.xml +0
-0@@ -307,7 +307,7 @@meta-bsp/packages/image-creator/image-creator-native_0.1.bb
documentation/bsp-guide/bsp.xml line 307
Quoted 1 line
documentation/bsp-guide/bsp.xml +0
-0The example below shows extra files contained in a folder called ${PN}(the package name).
documentation/bsp-guide/bsp.xml meta-bsp/packages/image-creator/image-creator-native_0.1.bb
Quoted 7 lines
documentation/bsp-guide/bsp.xml +1
-1</para> <programlisting> -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" </programlisting> <para> This technique allows the BSP to add machine-specific configuration files tothe layer directory,
Review
Quoted 1 line
(quoted diff) +0
-0b/meta-emenlow/recipes/formfactor/formfactor_0.0.bbappend
Review
Quoted 9 lines
index 4a41d48..a64f367 100644
meta-emenlow/recipes/formfactor/formfactor_0.0.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" PRINC = "1"(quoted diff) +0
-0b/meta-emenlow/recipes/linux/linux-yocto_git.bbappend
Review
Quoted 9 lines
index 9fa2937..77c5223 100644
meta-emenlow/recipes/linux/linux-yocto_git.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESEXTRAPATHS := "${THISDIR}/${PN}" +FILESEXTRAPATHS = "${THISDIR}/${PN}" COMPATIBLE_MACHINE_emenlow = "emenlow" KMACHINE_emenlow = "emenlow"(quoted diff) +0
-0b/meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend
Quoted 8 lines
index fac0921..c6f81d4 100644
meta-emenlow/recipes/linux/linux_2.6.33.2.bbappend +1
-1@@ -1,3 +1,3 @@ -FILESPATH := "${FILESPATH}:${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESEXTRAPATH = "${THISDIR}/${PN}" SRC_URI += "file://defconfig" COMPATIBLE_MACHINE_emenlow = "emenlow"