Commit d67015ee authored by Masahiro Yamada's avatar Masahiro Yamada

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: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
parent f58437ab
...@@ -125,12 +125,12 @@ gen_source () ...@@ -125,12 +125,12 @@ gen_source ()
rm -rf debian rm -rf debian
mkdir debian mkdir debian
user=${KBUILD_BUILD_USER-$(id -nu)} user=${KBUILD_BUILD_USER:-$(id -nu)}
name=${DEBFULLNAME-${user}} name=${DEBFULLNAME:-${user}}
if [ "${DEBEMAIL:+set}" ]; then if [ "${DEBEMAIL:+set}" ]; then
email=${DEBEMAIL} email=${DEBEMAIL}
else else
buildhost=${KBUILD_BUILD_HOST-$(hostname -f 2>/dev/null || hostname)} buildhost=${KBUILD_BUILD_HOST:-$(hostname -f 2>/dev/null || hostname)}
email="${user}@${buildhost}" email="${user}@${buildhost}"
fi fi
maintainer="${name} <${email}>" maintainer="${name} <${email}>"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment