Skip to contentSkip to conversation

mpm-transport: Do not use append with += operator

PATCH In review Khem Raj 3 participants 5 messages Nov 4, 2021 – Nov 15, 2021 1 message not in the archive

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 mpm-transport: Do not use append with += operator

this is undefined behaviour, mant times devs used them together to get the missing space at the beginning of string which append/prepend needs but thats not intended behaviour

---
 recipes-ti/mpm-transport/mpm-transport_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-ti/mpm-transport/mpm-transport_git.bb +2 -2
index 38aefc24..3b80af34 100644
@@ -21,8 +21,8 @@ PR = "r0"
 
 CC += "-fcommon"
 EXTRA_OEMAKE = "PDK_INSTALL_PATH=${STAGING_INCDIR}"
-EXTRA_OEMAKE:append:k2hk += "HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
-EXTRA_OEMAKE:append:k2e += "HYPLNK_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2hk = " HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2e = " HYPLNK_TRANSPORT=true"
 INSANE_SKIP:${PN} += "ldflags"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.33.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Khem Raj

this is undefined behaviour, mant times devs used them together to get the missing space at the beginning of string which append/prepend needs but thats not intended behaviour

Quoted 22 lines
---
 recipes-ti/mpm-transport/mpm-transport_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-ti/mpm-transport/mpm-transport_git.bb +2 -2
index 38aefc24..3b80af34 100644
@@ -21,8 +21,8 @@ PR = "r0"
 
 CC += "-fcommon"
 EXTRA_OEMAKE = "PDK_INSTALL_PATH=${STAGING_INCDIR}"
-EXTRA_OEMAKE:append:k2hk += "HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
-EXTRA_OEMAKE:append:k2e += "HYPLNK_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2hk = " HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2e = " HYPLNK_TRANSPORT=true"
 INSANE_SKIP:${PN} += "ldflags"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.33.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 8 lines · Denys Dmytriyenko
Quoted 5 lines · Khem Raj

this is undefined behaviour, mant times devs used them together to get the missing space at the beginning of string which append/prepend needs but thats not intended behaviour

Yogesh,

I don't believe this patch has made it into master...

Quoted 22 lines
Quoted 22 lines
---
 recipes-ti/mpm-transport/mpm-transport_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-ti/mpm-transport/mpm-transport_git.bb +2 -2
index 38aefc24..3b80af34 100644
@@ -21,8 +21,8 @@ PR = "r0"
 
 CC += "-fcommon"
 EXTRA_OEMAKE = "PDK_INSTALL_PATH=${STAGING_INCDIR}"
-EXTRA_OEMAKE:append:k2hk += "HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
-EXTRA_OEMAKE:append:k2e += "HYPLNK_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2hk = " HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2e = " HYPLNK_TRANSPORT=true"
 INSANE_SKIP:${PN} += "ldflags"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.33.1
Signature · 4 lines
Regards,
Denys Dmytriyenko <[email protected]>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964
#4 lore raw
Quoted 6 lines · Denys Dmytriyenko
Quoted 5 lines · Denys Dmytriyenko
Quoted 4 lines · Khem Raj

this is undefined behaviour, mant times devs used them together to get the missing space at the beginning of string which append/prepend needs but thats not intended behaviour

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Yogesh,

I don't believe this patch has made it into master...

Yes, I have not sync master. Is this applicable for dunfell?

Quoted 29 lines
Quoted 24 lines
Quoted 24 lines

---
  recipes-ti/mpm-transport/mpm-transport_git.bb | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
recipes-ti/mpm-transport/mpm-transport_git.bb +2 -2
index 38aefc24..3b80af34 100644
@@ -21,8 +21,8 @@ PR = "r0"
 
  CC += "-fcommon"
  EXTRA_OEMAKE = "PDK_INSTALL_PATH=${STAGING_INCDIR}"
-EXTRA_OEMAKE:append:k2hk += "HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
-EXTRA_OEMAKE:append:k2e += "HYPLNK_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2hk = " HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2e = " HYPLNK_TRANSPORT=true"
  INSANE_SKIP:${PN} += "ldflags"
 
  S = "${WORKDIR}/git"
Signature · 1 line
2.33.1
#5 lore raw
Quoted 11 lines · Yogesh
Quoted 8 lines · Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Khem Raj

this is undefined behaviour, mant times devs used them together to get the missing space at the beginning of string which append/prepend needs but thats not intended behaviour

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Yogesh,

I don't believe this patch has made it into master...

Yes, I have not sync master. Is this applicable for dunfell?

This fixes a warning in master, since bitbake now checks for mixing append/prepend/remove overrides along with +=
In dunfell it's not checked and no warning, but it's still not recommended, so it's up to you.

Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
---
 recipes-ti/mpm-transport/mpm-transport_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-ti/mpm-transport/mpm-transport_git.bb +2 -2
index 38aefc24..3b80af34 100644
@@ -21,8 +21,8 @@ PR = "r0"
 CC += "-fcommon"
 EXTRA_OEMAKE = "PDK_INSTALL_PATH=${STAGING_INCDIR}"
-EXTRA_OEMAKE:append:k2hk += "HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
-EXTRA_OEMAKE:append:k2e += "HYPLNK_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2hk = " HYPLNK_TRANSPORT=true SRIO_TRANSPORT=true"
+EXTRA_OEMAKE:append:k2e = " HYPLNK_TRANSPORT=true"
 INSANE_SKIP:${PN} += "ldflags"
 S = "${WORKDIR}/git"
Signature · 1 line
2.33.1
Signature · 4 lines
Regards,
Denys Dmytriyenko <[email protected]>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964