[packages/erlang] use temp file for capturing ex_doc stderr

atler atler at pld-linux.org
Tue Dec 10 18:44:35 CET 2024


commit 8bdb2a0e7619e9c84d96a92a4ab8a7e0f6b10ab2
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Dec 10 18:18:31 2024 +0100

    use temp file for capturing ex_doc stderr
    
    builders have no access to writable file descriptors represented as
    files

 erlang.spec                       | 2 +-
 proc-fd.patch => no-file-fd.patch | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/erlang.spec b/erlang.spec
index 45fd8b4..717333e 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -33,7 +33,7 @@ Source4:	epmd at .service
 Source5:	epmd at .socket
 Patch0:		%{name}-fPIC.patch
 Patch1:		x32.patch
-Patch2:		proc-fd.patch
+Patch2:		no-file-fd.patch
 Patch3:		%{name}-ac.patch
 URL:		http://www.erlang.org/
 %{?with_java:BuildRequires:	/usr/bin/jar}
diff --git a/proc-fd.patch b/no-file-fd.patch
similarity index 87%
rename from proc-fd.patch
rename to no-file-fd.patch
index aaeb8df..ec1e8ef 100644
--- a/proc-fd.patch
+++ b/no-file-fd.patch
@@ -5,7 +5,7 @@
  ## Running the command where we redirect stderr to fd 1 and stdout to fd 3.
  ## We then use tee on the stderr (which is now fd 1) to print that to fd 4
 -OUTPUT="$( { escript at EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee /dev/fd/4 )"
-+OUTPUT="$( { escript at EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee /proc/self/fd/4 )"
++OUTPUT="$( { escript at EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee ex_doc.stderr >&4 && cat ex_doc.stderr && rm ex_doc.stderr )"
  
  ## Close fd 3 and 4
  exec 3>&- 4>&-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/erlang.git/commitdiff/8bdb2a0e7619e9c84d96a92a4ab8a7e0f6b10ab2



More information about the pld-cvs-commit mailing list