From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>
Subject: [PATCH] kbuild: deb-pkg: use default string when variable is unset or null
Date: Fri, 5 Jul 2024 00:23:32 +0900 [thread overview]
Message-ID: <20240704152400.1527619-1-masahiroy@kernel.org> (raw)
${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>
---
scripts/package/mkdebian | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 0cc1913aad30..196b14e8ad47 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}>"
--
2.43.0
next reply other threads:[~2024-07-04 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 15:23 Masahiro Yamada [this message]
2024-07-05 17:05 ` [PATCH] kbuild: deb-pkg: use default string when variable is unset or null Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240704152400.1527619-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox