Skip to contentSkip to conversation

scons.bbclass: Make MAXLINELENGTH overridable

PATCH In review Khem Raj 3 participants 3 messages Feb 2, 2023 – Feb 11, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 scons.bbclass: Make MAXLINELENGTH overridable

older scons do not support MAXLINELENGTH and some packages still may be using older scons, these recipes can clear SCONS_MAXLINELENGTH in them and get going. Set

SCONS_MAXLINELENGTH = ""

in such recipes.

Cc Martin Jansa <[email protected]>
---
 meta/classes-recipe/scons.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/classes-recipe/scons.bbclass +5 -4
index d510c12b9b..d20a78dc6e 100644
@@ -10,11 +10,12 @@ DEPENDS += "python3-scons-native"
 
 EXTRA_OESCONS ?= ""
 # This value below is derived from $(getconf ARG_MAX)
-SCONS_MAXLINELENGTH ?= "2097152"
+SCONS_MAXLINELENGTH ?= "MAXLINELENGTH=2097152"
+EXTRA_OESCONS:append = " ${SCONS_MAXLINELENGTH}"
 do_configure() {
 	if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
 		if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
-			${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} prefix=${prefix} ${EXTRA_OESCONS}
+			${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
 		fi
 
 		mkdir -p `dirname ${CONFIGURESTAMPFILE}`
@@ -23,12 +24,12 @@ do_configure() {
 }
 
 scons_do_compile() {
-	${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} || \
+	${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
 	die "scons build execution failed."
 }
 
 scons_do_install() {
-	${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} install || \
+	${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
 	die "scons install execution failed."
 }
 
Signature · 1 line
2.39.1
#1 lore raw

Steve,

I've noticed that you have:
b0e7777a91 scons: Pass MAXLINELENGTH to scons invocation in contrib/stable/kirkstone-nut, but not this follow-up fix.

Please either take both of them or neither.

Cheers,

Quoted 65 lines · Khem Raj

older scons do not support MAXLINELENGTH and some packages still may be using older scons, these recipes can clear SCONS_MAXLINELENGTH in them and get going. Set

SCONS_MAXLINELENGTH = ""

in such recipes.

Cc Martin Jansa <[email protected]>
---
 meta/classes-recipe/scons.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/classes-recipe/scons.bbclass +2 -1
index d510c12b9b..d20a78dc6e 100644
@@ -10,11 +10,12 @@ DEPENDS += "python3-scons-native"
 
 EXTRA_OESCONS ?= ""
 # This value below is derived from $(getconf ARG_MAX)
-SCONS_MAXLINELENGTH ?= "2097152"
+SCONS_MAXLINELENGTH ?= "MAXLINELENGTH=2097152"
+EXTRA_OESCONS:append = " ${SCONS_MAXLINELENGTH}"
 do_configure() {
        if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
                if [ -e "${CONFIGURESTAMPFILE}" -a "`cat
 ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ];

then
- ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
--clean PREFIX=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} prefix=${prefix} ${EXTRA_OESCONS}

meta/classes-recipe/scons.bbclass +2 -3
+                       ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
--clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
                fi
 
                mkdir -p `dirname ${CONFIGURESTAMPFILE}`
@@ -23,12 +24,12 @@ do_configure() {
 }
 
 scons_do_compile() {
-       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE}
 PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH}
 ${EXTRA_OESCONS} || \
+       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE}
 PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
        die "scons build execution failed."
 }
 
 scons_do_install() {
-       ${STAGING_BINDIR_NATIVE}/scons --directory=${S}

install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} install || \
+ ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
die "scons install execution failed."
}

--
2.39.1

#2 lore raw
Quoted 6 lines · Martin Jansa

Steve,

I've noticed that you have:
b0e7777a91 scons: Pass MAXLINELENGTH to scons invocation in contrib/stable/kirkstone-nut, but not this follow-up fix.

Got it!

Thanks,

Steve

Quoted 53 lines · Khem Raj
Quoted 52 lines

older scons do not support MAXLINELENGTH and some packages still may be using older scons, these recipes can clear SCONS_MAXLINELENGTH in them and get going. Set

SCONS_MAXLINELENGTH = ""

in such recipes.

Cc Martin Jansa <[email protected]>
---
 meta/classes-recipe/scons.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/classes-recipe/scons.bbclass +5 -5
index d510c12b9b..d20a78dc6e 100644
@@ -10,11 +10,12 @@ DEPENDS += "python3-scons-native"
 
 EXTRA_OESCONS ?= ""
 # This value below is derived from $(getconf ARG_MAX)
-SCONS_MAXLINELENGTH ?= "2097152"
+SCONS_MAXLINELENGTH ?= "MAXLINELENGTH=2097152"
+EXTRA_OESCONS:append = " ${SCONS_MAXLINELENGTH}"
 do_configure() {
        if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
                if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
-                       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} prefix=${prefix} ${EXTRA_OESCONS}
+                       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
                fi
 
                mkdir -p `dirname ${CONFIGURESTAMPFILE}`
@@ -23,12 +24,12 @@ do_configure() {
 }
 
 scons_do_compile() {
-       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} || \
+       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
        die "scons build execution failed."
 }
 
 scons_do_install() {
-       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} install || \
+       ${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
        die "scons install execution failed."
 }
 
--

2.39.1