Than you, Pascal!
I not tested your script, sorry. I move other ways.
Booted into SliTaz Rolling Kultex Edition. And see your results (i.e. without libffi.so.5)
Booted into Puppy-Quirky and see no libffi.so.5 in the ldd listing too.
Something wrong with ldd, thanks no with packages.
I use ldd from glibc-dev package, so anyone who still using SliTaz 4.0 can repeat my test.
Sure that I use "official" ldd, not SliTaz script:
$ ldd --help
Usage: ldd [OPTION]... FILE...
--help print this help and exit
--version print version information and exit
-d, --data-relocs process data relocations
-r, --function-relocs process data and function relocations
-u, --unused print unused direct dependencies
-v, --verbose print all information
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
SliTaz /usr/bin/ldd script have no options.
I'm on SliTaz Stable now, and I extracted latest Cooking glib package to /home/tux/test-depends:
$ ldd /home/tux/test-depends/glib-2.32.4/fs/usr/bin/gdbus
linux-gate.so.1 => (0xffffe000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb77da000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb77a9000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb77a6000)
libdl.so.2 => /lib/libdl.so.2 (0xb77a2000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7790000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb777b000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb769d000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7699000)
libpcre.so.1 => not found
libpthread.so.0 => /lib/libpthread.so.0 (0xb7680000)
librt.so.1 => /lib/librt.so.1 (0xb7678000)
libffi.so.6 => not found
libc.so.6 => /lib/libc.so.6 (0xb7534000)
libffi.so.5 => /usr/lib/libffi.so.5 (0xb752f000)
/lib/ld-linux.so.2 (0xb78c0000)
And libffi.so.5 is here!
Let's show libffi strings from this binary:
$ strings ~/test-depends/glib-2.32.4/fs/usr/bin/gdbus | grep libffi
libffi.so.6
No, don't trust your eyes with ldd listing! None libffi.so.5!
Chroot into Cooking environment:
$ su
Password:
# tazdev chroot
Mounting virtual filesystems... [ OK ]
Chrooting to: /home/slitaz/cooking/chroot
Which ldd I use?
root@slitaz:/# ldd --help
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (ru_RU)
Usage: ldd [OPTION]... FILE...
--help print this help and exit
--version print version information and exit
-d, --data-relocs process data relocations
-r, --function-relocs process data and function relocations
-u, --unused print unused direct dependencies
-v, --verbose print all information
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
Same.
Let's show ldd output from /usr/bin/gdbus installed in my Cooking Chroot:
root@slitaz:/# ldd /usr/bin/gdbus
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (ru_RU)
linux-gate.so.1 => (0xffffe000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb776e000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb772f000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb772c000)
libdl.so.2 => /lib/libdl.so.2 (0xb7727000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7713000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb76fb000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb761c000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb761a000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0xb75e4000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb75c8000)
librt.so.1 => /lib/librt.so.1 (0xb75bf000)
libffi.so.6 => /usr/lib/libffi.so.6 (0xb75ba000)
libc.so.6 => /lib/libc.so.6 (0xb7443000)
/lib/ld-linux.so.2 (0xb78ac000)
Only libffi.so.6.
Let's calculate md5sum:
root@slitaz:/# md5sum /usr/bin/gdbus
df7d621caccfa966f6b8f3a833b26e7d /usr/bin/gdbus
Exit from chroot to my stable system:
root@slitaz:/# exit
Unmounting virtual filesystems... [ OK ]
Calculate md5sum for latest Cooking extracted gdbus:
# md5sum /home/tux/test-depends/glib-2.32.4/fs/usr/bin/gdbus
df7d621caccfa966f6b8f3a833b26e7d /home/tux/test-depends/glib-2.32.4/fs/usr/bin/gdbus
Checksums are the same.
Test ldd, and output the same like in the very beginning. Both libffi are here…
______
For what I need these ldd outputs?
I wrote script that checks all executable binaries and libraries deep in the given folder ($fs when cooked), then it processed ldd output for that binaries and libraries, sorted, deleted existing libs, sorted, finded packages that contained needed depends, and outputs list of depends to me. I use that list in my receipts in the DEPENDS variable.
Ok, now I know that I want to run my script within Chroot. Better I add that functionality to my /usr/bin/cook, like this:
cook qtfm --check-deps