File 1128-tools-Fix-test-of-emacs-version.patch of Package erlang
From 1da4a4a1cfa9cee0ae39d7924743ad1e84d60a73 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Fri, 16 Oct 2020 17:18:35 +0200
Subject: [PATCH] tools: Fix test of emacs version
head -1 is not posix standard.
Maybe this will prevent the core dumps we've seen in emacs on
old linux ppc (nain).
---
lib/tools/test/emacs_SUITE.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tools/test/emacs_SUITE.erl b/lib/tools/test/emacs_SUITE.erl
index a65a131817..e5587b35b1 100644
--- a/lib/tools/test/emacs_SUITE.erl
+++ b/lib/tools/test/emacs_SUITE.erl
@@ -113,7 +113,7 @@ diff(Orig, File) ->
end.
emacs_version_ok() ->
- case os:cmd("emacs --version | head -1") of
+ case os:cmd("emacs --version | head -n 1") of
"GNU Emacs " ++ Ver ->
case string:to_float(Ver) of
{Vsn, _} when Vsn >= 24.1 ->
--
2.26.2