Message ID | 20220902201247.605908-1-rs@ti.com |
---|---|
State | Accepted |
Delegated to: | Ryan Eatmon |
Headers | show |
Series | [dunfell] ti-sci-fw: Use d.getVar() in DEPENDS expression | expand |
On 9/2/22 3:12 PM, Randolph Sapp via lists.yoctoproject.org wrote: > Switch the DEPENDS_append expression to use d.getVar() instead of the > usual variable expansion to prevent the inline Python command from > becoming mangled. > I had originally done it this way (just due to copy/paste from elsewhere), but couldn't think of a case that would cause mangling, do you have an example? Either way LGTM, Acked-by: Andrew Davis <afd@ti.com> > Signed-off-by: Randolph Sapp <rs@ti.com> > --- > recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb > index 3986af47..2a59e896 100644 > --- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb > +++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb > @@ -9,7 +9,7 @@ DEPENDS_remove_am65xx-hs-evm-k3r5-sr2 = " virtual/bootloader" > DEPENDS_remove_j7-evm-k3r5 = " virtual/bootloader" > DEPENDS_remove_j7-hs-evm-k3r5 = " virtual/bootloader" > DEPENDS_remove_j7-hs-evm-k3r5-sr1-1 = " virtual/bootloader" > -DEPENDS_append = " ${@ '' if '${TI_SECURE_DEV_PKG_K3}' else 'ti-k3-secdev-native' }" > +DEPENDS_append = " ${@ '' if d.getVar('TI_SECURE_DEV_PKG_K3') else 'ti-k3-secdev-native' }" > > CLEANBROKEN = "1" > PR = "${INC_PR}.2" > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#14991): https://lists.yoctoproject.org/g/meta-ti/message/14991 > Mute This Topic: https://lists.yoctoproject.org/mt/93427763/3619733 > Group Owner: meta-ti+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Tue, Sep 6, 2022 at 13:37, Andrew Davis <afd@ti.com> wrote: > I had originally done it this way (just due to copy/paste from > elsewhere), but > couldn't think of a case that would cause mangling, do you have an > example? Ah, sorry. I didn't actually spend the time to see if it was actually mangling from the variable or just Yocto moving away from this notation and python choking on the un-expanded variable. https://docs.yoctoproject.org/dunfell/ref-manual/migration-2.1.html?highlight=d+getvar#variable-expansion-in-python-functions
On 9/9/22 11:28 AM, Sapp, Randolph wrote: > On Tue, Sep 6, 2022 at 13:37, Andrew Davis <afd@ti.com> wrote: >> I had originally done it this way (just due to copy/paste from elsewhere), but >> couldn't think of a case that would cause mangling, do you have an example? > > Ah, sorry. I didn't actually spend the time to see if it was actually mangling from the variable or just Yocto moving away from this notation and python choking on the un-expanded variable. > > https://docs.yoctoproject.org/dunfell/ref-manual/migration-2.1.html?highlight=d+getvar#variable-expansion-in-python-functions > > I see, well if Yocto is moving away they must be doing it for a good reason, so all good here. Andrew
diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb index 3986af47..2a59e896 100644 --- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb @@ -9,7 +9,7 @@ DEPENDS_remove_am65xx-hs-evm-k3r5-sr2 = " virtual/bootloader" DEPENDS_remove_j7-evm-k3r5 = " virtual/bootloader" DEPENDS_remove_j7-hs-evm-k3r5 = " virtual/bootloader" DEPENDS_remove_j7-hs-evm-k3r5-sr1-1 = " virtual/bootloader" -DEPENDS_append = " ${@ '' if '${TI_SECURE_DEV_PKG_K3}' else 'ti-k3-secdev-native' }" +DEPENDS_append = " ${@ '' if d.getVar('TI_SECURE_DEV_PKG_K3') else 'ti-k3-secdev-native' }" CLEANBROKEN = "1" PR = "${INC_PR}.2"
Switch the DEPENDS_append expression to use d.getVar() instead of the usual variable expansion to prevent the inline Python command from becoming mangled. Signed-off-by: Randolph Sapp <rs@ti.com> --- recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)