diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-09-25 10:37:48 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-09-25 10:37:48 +0000 |
commit | 192c9711daa841458fd0900d0de2f9d66ac74ce5 (patch) | |
tree | 6a700a3cf8d1c9057f740ff6517833c92f2efffc /find-provides.in | |
parent | f3ed619d46ca559d07a8893aef26911bd63a42d2 (diff) | |
download | rpm-setup-192c9711daa841458fd0900d0de2f9d66ac74ce5.tar rpm-setup-192c9711daa841458fd0900d0de2f9d66ac74ce5.tar.gz rpm-setup-192c9711daa841458fd0900d0de2f9d66ac74ce5.tar.bz2 rpm-setup-192c9711daa841458fd0900d0de2f9d66ac74ce5.tar.xz rpm-setup-192c9711daa841458fd0900d0de2f9d66ac74ce5.zip |
add support for MIPS n32 binaries in find-requires and find-provides
(from Arnaud Patard)
Diffstat (limited to 'find-provides.in')
-rwxr-xr-x | find-provides.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/find-provides.in b/find-provides.in index 23c9296..13eed22 100755 --- a/find-provides.in +++ b/find-provides.in @@ -5,7 +5,7 @@ filelist=`sed "s/['\"]/\\\&/g"` -solist=$(echo "$filelist" | egrep -v "^/lib/ld\.so|/usr/lib(64)?/gcj/" | egrep '(/usr(/X11R6)?)?/lib(64)?/.*\.so' | \ +solist=$(echo "$filelist" | egrep -v "^/lib/ld\.so|/usr/lib(32|64)?/gcj/" | egrep '(/usr(/X11R6)?)?/lib(32|64)?/.*\.so' | \ xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1) pythonlist= tcllist= @@ -16,6 +16,7 @@ case `uname -m` in alpha*) mark64="" ;; *) mark64="()(64bit)" ;; esac +mark32="()(n32)" # # --- Library sonames and weak symbol versions (from glibc). @@ -24,6 +25,10 @@ for f in $solist; do lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + if [ "$lib64" != "$mark64" ]; then + lib64=`if file -L $f 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "$mark32"; fi` + fi if [ "$soname" != "" ]; then if [ ! -L $f ]; then echo $soname$lib64 @@ -83,10 +88,13 @@ fi # # --- .so files. -for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do +for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|32|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do objd=`objdump -p ${i} | grep SONAME` [ -h ${i} -a -n "${objd}" ] && \ lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \ + if [ "$lib64" != "(64bit)" ]; then + lib64=`if file -L $i 2>/dev/null | grep "MIPS, N32" >/dev/null; then echo "(n32)"; fi` + fi && \ echo ${objd} | perl -p -e "s/.*SONAME\s+(\S+)\.so.*/devel(\1$lib64)/g" done | sort -u |