lkml.org 
[lkml]   [2018]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] kbuild/debian: Use KBUILD_BUILD_* when set
Date
Be nice to the user and check env vars KBUILD_BUILD_USER &
KBUILD_BUILD_HOST when those are set.

Since DEBEMAIL accept a syntax where the full name is present, be extra
nice to user and extract email address only.

Cc: Riku Voipio <riku.voipio@linaro.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: update patch since syntax of DEBEMAIL may contain full name

scripts/package/mkdebian | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 6adb3a16ba3b..3f4e43446db3 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -73,9 +73,19 @@ fi

# Try to determine maintainer and email values
if [ -n "$DEBEMAIL" ]; then
- email=$DEBEMAIL
+ case "$DEBEMAIL" in
+ *\ * )
+ email=$(echo $DEBEMAIL | cut -d '<' -f2 | cut -d '>' -f1)
+ echo >&2 "Extracting email from DEBEMAIL. Use DEBFULLNAME instead."
+ ;;
+ *)
+ email=$DEBEMAIL
+ ;;
+ esac
elif [ -n "$EMAIL" ]; then
email=$EMAIL
+elif [ -n "$KBUILD_BUILD_USER" ] && [ -n "$KBUILD_BUILD_HOST" ]; then
+ email=$KBUILD_BUILD_USER@$KBUILD_BUILD_HOST
else
email=$(id -nu)@$(hostname -f 2>/dev/null || hostname)
fi
--
2.11.0
\
 
 \ /
  Last update: 2018-05-03 09:44    [W:0.071 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site