[projects/geninitrd] glibc 2.31 ldd prints 'not a dynamic executable' on stderr, so silence it.

arekm arekm at pld-linux.org
Tue Feb 4 22:28:24 CET 2020


commit b4c7f62cc3963af683b69092fb2f44076d5e3bb3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Feb 4 22:28:16 2020 +0100

    glibc 2.31 ldd prints 'not a dynamic executable' on stderr, so silence it.

 geninitrd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 052f553..e9832ef 100755
--- a/geninitrd
+++ b/geninitrd
@@ -551,7 +551,7 @@ inst_exec() {
 		esac
 
 
-		libs=$(ldd "$obj" | awk '/statically|linux-(gate|vdso)\.so/{next} NF == 2 {print $1} /=/{print $3}' | sort -u)
+		libs=$(ldd "$obj" 2> /dev/null | awk '/statically|linux-(gate|vdso)\.so/{next} NF == 2 {print $1} /=/{print $3}' | sort -u)
 		for lib in $libs $libs_additional; do
 			libdir=$(cd $(dirname "$lib"); pwd)
 			if [ ! -f "$DESTDIR/$lib" ]; then
@@ -566,7 +566,7 @@ inst_exec() {
 	for _lib in $(get_libdir LIBDIR); do
 		if [ -f $DESTDIR/$_lib/libc.so.0 ]; then
 			lib=$DESTDIR/$_lib/libc.so.0
-			lib=$(ldd "$lib" | awk '/statically|linux-(gate|vdso)\.so/{next} NF == 2 {print $1} /=/{print $3}' | sort -u)
+			lib=$(ldd "$lib" 2> /dev/null | awk '/statically|linux-(gate|vdso)\.so/{next} NF == 2 {print $1} /=/{print $3}' | sort -u)
 			libdir=$(cd $(dirname "$lib"); pwd)
 			if [ ! -e $DESTDIR$libdir ]; then
 				libdir=$(dirname "$libdir")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/b4c7f62cc3963af683b69092fb2f44076d5e3bb3



More information about the pld-cvs-commit mailing list