Skip to content

Commit d67015e

Browse files
committed
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 <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
1 parent f58437a commit d67015e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/package/mkdebian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ gen_source ()
125125
rm -rf debian
126126
mkdir debian
127127

128-
user=${KBUILD_BUILD_USER-$(id -nu)}
129-
name=${DEBFULLNAME-${user}}
128+
user=${KBUILD_BUILD_USER:-$(id -nu)}
129+
name=${DEBFULLNAME:-${user}}
130130
if [ "${DEBEMAIL:+set}" ]; then
131131
email=${DEBEMAIL}
132132
else
133-
buildhost=${KBUILD_BUILD_HOST-$(hostname -f 2>/dev/null || hostname)}
133+
buildhost=${KBUILD_BUILD_HOST:-$(hostname -f 2>/dev/null || hostname)}
134134
email="${user}@${buildhost}"
135135
fi
136136
maintainer="${name} <${email}>"

0 commit comments

Comments
 (0)