summaryrefslogtreecommitdiff
path: root/scripts/package
diff options
context:
space:
mode:
authorChristian Kujau <lists@nerdbynature.de>2015-08-02 20:03:26 -0700
committerMichal Marek <mmarek@suse.com>2015-08-19 18:04:44 +0200
commitbea107b1f1ee79da0bc2c1ee0c70bf1c3c6c41b4 (patch)
tree383a496c11779c3305275af31ddba3c9477b9326 /scripts/package
parentbec8a5a22640325e86cf5b737c18888747631099 (diff)
downloadlwn-bea107b1f1ee79da0bc2c1ee0c70bf1c3c6c41b4.tar.gz
lwn-bea107b1f1ee79da0bc2c1ee0c70bf1c3c6c41b4.zip
fallback to hostname in scripts/package/builddeb
I happened to build a kernel with "make deb-pkg" on a machine with no network connectivity, but this failed with: [...] INSTALL debian/headertmp/usr/include/asm/ (65 files) hostname: Name or service not known ../scripts/package/Makefile:90: recipe for target 'deb-pkg' failed make[2]: *** [deb-pkg] Error 1 In scripts/package/builddeb it tries to construct an email address (that can be queried in /proc/version later on) but with no network, the "hostname -f" fails. The following patch falls back to just use the shortname if we cannot determine our FQDN. Signed-off-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/builddeb2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 0ccd7ee583ec..0c18cfd93287 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -214,7 +214,7 @@ if [ -n "$DEBEMAIL" ]; then
elif [ -n "$EMAIL" ]; then
email=$EMAIL
else
- email=$(id -nu)@$(hostname -f)
+ email=$(id -nu)@$(hostname -f 2>/dev/null || hostname)
fi
if [ -n "$DEBFULLNAME" ]; then
name=$DEBFULLNAME