Skip to contentSkip to conversation

opkg: Fix poor operator combination choice

PATCH In review Richard Purdie 3 participants 4 messages Nov 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opkg: Fix poor operator combination choice

Combining :append with += rarely makes sense. Improve it to use the standard format (and tweak the implied spacing).

---
 meta/recipes-devtools/opkg/opkg_0.4.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/opkg/opkg_0.4.5.bb +1 -1
index 2760fc58786..8af047a51ff 100644
@@ -60,7 +60,7 @@ do_install_ptest () {
 	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
 }
 
-WARN_QA:append += "openssl-deprecation"
+WARN_QA:append = " openssl-deprecation"
 QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
 def package_qa_check_openssl_deprecation (package, d, messages):
     sane = True
Signature · 1 line
2.32.0
#1 lore raw
Quoted 2 lines · Richard Purdie

Combining :append with += rarely makes sense. Improve it to use the standard format (and tweak the implied spacing).

Maybe I'm silly but I find :append with += safer to do than manually remembring to add the space character.

-Mikko

Quoted 31 lines
---
 meta/recipes-devtools/opkg/opkg_0.4.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/opkg/opkg_0.4.5.bb +1 -1
index 2760fc58786..8af047a51ff 100644
@@ -60,7 +60,7 @@ do_install_ptest () {
 	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
 }
 
-WARN_QA:append += "openssl-deprecation"
+WARN_QA:append = " openssl-deprecation"
 QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
 def package_qa_check_openssl_deprecation (package, d, messages):
     sane = True
Signature · 11 lines
2.32.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157844): https://lists.openembedded.org/g/openembedded-core/message/157844
Mute This Topic: https://lists.openembedded.org/mt/86816265/3616751
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
#2 lore raw
Quoted 5 lines · Mikko Rapeli
Quoted 2 lines · Richard Purdie

Combining :append with += rarely makes sense. Improve it to use the standard format (and tweak the implied spacing).

Maybe I'm silly but I find :append with += safer to do than manually remembring to add the space character.

I tend to agree; hence why I wrote it that way in the original patch. But I'm not going to defend the practice in this case, so ACK from me either way.

I'm intending to drop this recipe warning after the opkg_0.5.0 release in December. So the recipe-as-written will only exist in the mainline for another few months.

Quoted 13 lines
Quoted 13 lines
---
  meta/recipes-devtools/opkg/opkg_0.4.5.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/opkg/opkg_0.4.5.bb +0 -0
index 2760fc58786..8af047a51ff 100644
@@ -60,7 +60,7 @@ do_install_ptest () {
  	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
  }
 
Quoted 9 lines
Quoted 8 lines
meta/recipes-devtools/opkg/opkg_0.4.5.bb +1 -1
-WARN_QA:append += "openssl-deprecation"
+WARN_QA:append = " openssl-deprecation"
  QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
  def package_qa_check_openssl_deprecation (package, d, messages):
      sane = True
Signature · 1 line
2.32.0

Thanks,

Signature · 5 lines
Alex Stewart
Software Engineer - NI Real-Time OS
NI (National Instruments)

[email protected]
#3 lore raw
Quoted 10 lines · Alex Stewart
Quoted 5 lines · Mikko Rapeli
Quoted 2 lines · Richard Purdie

Combining :append with += rarely makes sense. Improve it to use the standard format (and tweak the implied spacing).

Maybe I'm silly but I find :append with += safer to do than manually remembring to add the space character.

I tend to agree; hence why I wrote it that way in the original patch. But I'm not going to defend the practice in this case, so ACK from me either way.

There is a patch on the bitbake list which would make this usage a warning. It certainly isn't obvious to most new users that:

YYY:append += "XXX"

really means

YYY:append = " XXX"

so I tend to prefer the later as being much clearer about what is happening. Part of what we need to to improve usability is to remove some of these confusions so standardising on things like this seems to make sense.

Quoted 3 lines

I'm intending to drop this recipe warning after the opkg_0.5.0 release in December. So the recipe-as-written will only exist in the mainline for another few months.

Sounds good.

Cheers,

Richard