From: Masahiro Yamada Date: Thu, 4 Jul 2024 15:23:32 +0000 (+0900) Subject: kbuild: deb-pkg: use default string when variable is unset or null X-Git-Tag: v6.11-rc1~62^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d67015eedd9722cfbf9d929be743ce27dfcd0744;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Nathan Chancellor --- diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index f962d303502b7..10637d4037776 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}>"