提交 bea107b1 编写于 作者: C Christian Kujau 提交者: Michal Marek

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: NChristian Kujau <lists@nerdbynature.de>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 bec8a5a2
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册