Skip to contentSkip to conversation

commit 8ef052389f7f breaks make bindeb-pkg

PATCH Superseded Bert Karwatzki 2 participants 4 messages Jul 9, 2024 – Jul 14, 2024 Kbuild

lore
Share & tools
lore
#0 lore raw

Since linux-next-20240709 "make bindeb-pkg" fails with this error message:

$ make bindeb-pkg
   GEN     debian
 ./scripts/package/mkdebian: 138: 1: parameter not set
 make[2]: *** [scripts/Makefile.package:98: debian] Error 2
 make[1]: *** [/mnt/data/linux-forest/linux-next/Makefile:1538: bindeb-pkg] Error 2
 make: *** [Makefile:224: __sub-make] Error 2

Reverting commit 8ef052389f7f fixes the issue. make deb-pkg is not affected and works as usual.

Bert Karwatzki

#1 lore raw

PATCH 1/1 kbuild: deb-pkg: fix building with bindeb-pkg

Since the introduction of "set -u" into scripts/package/mkdebian running the mkdebian scripts fails when it is called with no arguments (which is the case when building the kernel with 'make bindeb-pkg'). This patch introduces an additional check so mkdebian can be run without arguments.

Fixes 8ef052389f7f ("kbuild: package: add -e and -u options to some shell scripts")
---
 scripts/package/mkdebian | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/mkdebian +1 -1
index 196b14e8ad47..5eb506573a4d 100755
@@ -135,7 +135,7 @@ else
 fi
 maintainer="${name} <${email}>"
 
-if [ "$1" = --need-source ]; then
+if [ $# -eq 1 ] [ "$1" = --need-source ]; then
 	gen_source
 fi
 

--
2.45.2

#2 lore raw

Re: [PATCH] kbuild: deb-pkg: fix building with bindeb-pkg

scripts/package/mkdebian else · line 138

Quoted 10 lines · Bert Karwatzki
scripts/package/mkdebian +1 -1
index 196b14e8ad47..5eb506573a4d 100755
@@ -135,7 +135,7 @@ else
 fi
 maintainer="${name} <${email}>"
 
-if [ "$1" = --need-source ]; then
+if [ $# -eq 1 ] [ "$1" = --need-source ]; then

[: too many arguments

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
#3 lore raw

PATCH v2 1/1 kbuild: deb-pkg: fix building with bindeb-pkg

Since the introduction of "set -u" into scripts/package/mkdebian running the mkdebian scripts fails when it is called with no arguments (which is the case when building the kernel with 'make bindeb-pkg'). This patch introduces an additional check so mkdebian can be run without arguments.

Fixes 8ef052389f7f ("kbuild: package: add -e and -u options to some shell scripts")
---
 scripts/package/mkdebian | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/mkdebian +1 -1
index 196b14e8ad47..fbd01175c870 100755
@@ -135,7 +135,7 @@ else
 fi
 maintainer="${name} <${email}>"
 
-if [ "$1" = --need-source ]; then
+if [ $# -eq 1 ] && [ "$1" = --need-source ]; then
 	gen_source
 fi
 

--
2.45.2

Sorry, but the previous patch contained an embarrassing error, here's the fixed one.

Bert Karwatzki