summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-07-05 00:23:32 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-07-16 16:07:14 +0900
commitd67015eedd9722cfbf9d929be743ce27dfcd0744 (patch)
tree7787dedcb5e6a07926201eb21b2a81dd9d73d58a /scripts
parentf58437aba0a35825dc14dbbf7a1e452662ef797d (diff)
downloadlwn-d67015eedd9722cfbf9d929be743ce27dfcd0744.tar.gz
lwn-d67015eedd9722cfbf9d929be743ce27dfcd0744.zip
kbuild: deb-pkg: use default string when variable is unset or null
${DEBFULLNAME-${user}} falls back to ${user} when DEBFULLNAME is unset. It is more reasonable to do so when DEBFULLNAME is unset or null. Otherwise, the command: $ DEBFULLNAME= make deb-pkg will leave the name field blank. The same applies to KBUILD_BUILD_USER and KBUILD_BUILD_HOST. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/package/mkdebian6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f962d303502b..10637d403777 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -125,12 +125,12 @@ gen_source ()
rm -rf debian
mkdir debian
-user=${KBUILD_BUILD_USER-$(id -nu)}
-name=${DEBFULLNAME-${user}}
+user=${KBUILD_BUILD_USER:-$(id -nu)}
+name=${DEBFULLNAME:-${user}}
if [ "${DEBEMAIL:+set}" ]; then
email=${DEBEMAIL}
else
- buildhost=${KBUILD_BUILD_HOST-$(hostname -f 2>/dev/null || hostname)}
+ buildhost=${KBUILD_BUILD_HOST:-$(hostname -f 2>/dev/null || hostname)}
email="${user}@${buildhost}"
fi
maintainer="${name} <${email}>"