To sum up, the usage isn't exactly intuitive and I receive an error indicating how the usage is incorrect at every attempt without a correct usage example.
Sorry about that, not exactly an English speaker here.
I'll try to re-explain my idea.
Let's say today I get bored, and feel like making a new extension. (for instance: ibus.tcz)
First, we compile it from source.
./configure ~~ make ~~ make install DESTDIR=/tmp/ibus-base
After all the stripping, we end up with a "top_directory" (
/tmp/ibus-base),
which contains some libraries and some python scripts, make sense
The main idea of the script is to find all the "shared libraries" required by the program.
To do that with my script, just type
/path/to/the/script /tmp/ibus-basetc@box:~/ $ get-dep-list /tmp/ibus-base
dconf.tcz
libnotify.tcz
You can have a colorful output by passing "-c", by the way.
My script first validate that
the first argument it gets is a directory, and cd to it.
No, I never use /tmp/tcloop as the default directory.
There never was a "default directory" to begin with.
That's why you get
/mnt/sda2/tc7-x86/optional $ getDepList -f *
/usr/local/bin/getDepList: cd: line 120: can't cd to NAS-Connect.tcz
/mnt/sda2/tc7-x86/optional $ getDepList -f /mnt/sda2/tc7-x86/optional/*
/usr/local/bin/getDepList: cd: line 120: can't cd to /mnt/sda2/tc7-x86/optional/NAS-Connect.tcz
/tmp/tcloop/firefox/usr/local/firefox $ getDepList -f *
/usr/local/bin/getDepList: cd: line 120: can't cd to Throbber-small.gif
/tmp/tcloop/firefox/usr/local/firefox $ getDepList -f ./firefox
/usr/local/bin/getDepList: cd: line 120: can't cd to ./firefox
Apparently you don't have a directory named "firefox" in your "/tmp/tcloop/firefox/usr/local/firefox"
In order to scan all the "shared libraries", I use "find -exec ldd {} +" to do the trick.
Thanks
andyj who point out that
1. Not all dependencies are libraries, just as not all extensions are libraries. Be careful when you say extensions seem to have unneeded dependecies.
2. Watch out for circular (mutual) dependencies. Freetype <-> harfbuzz and cyrus-sasl <-> openldap are two that I know of off the top of my head.
3. Many dependencies are optional. This is particularly true for programs that use plugins / extensions / modules like Apache, PHP, LDAP, rsyslog, Postgresql, etc.
4. This requires that copy2fs.flg or copy2fs.lst not be used. Might be a problem in some cases.
Due to the copy2fs feature, the contents in a extension get copied to the RAM.
That extension will be dismissed because I check /tmp/tcloop/extension_name to figure out which tcz contains the library.
That's why you get
WARNING! copy2fs.lst found in /mnt/sda2/tc7-x86, please disable it and reboot
Since ibus depends on iso-codes and python, I need to add that to the "list-to-scan".
I can append the list by typing
/path/to/the/script /tmp/ibus-base iso-codes python (with or without ".tcz")
tc@box:~/ $ get-dep-list /tmp/ibus-base iso-codes python
dconf.tcz
iso-codes.tcz
libnotify.tcz
python.tcz
Actually I'm considering merging ibus.tcz and ibus-gir.tcz since they depends on each other.I can redirect the list to a file and move on packing the extension.
tc@box:~/ $ get-dep-list /tmp/ibus-base iso-codes python > /tmp/ibus.tcz.dep
In your case, you should do
/path/to/the/script /tmp/tcloop/firefox cairo.tcz gamin.tcz hicolor-icon-theme.tczOr you can be lazy and do
/path/to/the/script /tmp/tcloop/firefox `cat firefox.dep`(When I do this test, I boot with bootcode "base", and then only load firfox)
These dependencies are missing
libXt.so.6
libgdk-x11-2.0.so.0
libgtk-x11-2.0.so.0
dbus-glib.tcz
gamin.tcz
gtk3.tcz
hicolor-icon-theme.tcz
libasound.tcz
In fact, my script also suggest adding gtk2.tcz to the dep file.
Althought, we all know that firefox goes well without it
Anyway~, after loading gtk2 you'll see
dbus-glib.tcz
gamin.tcz
gtk2.tcz
gtk3.tcz
hicolor-icon-theme.tcz
libasound.tcz
cairo.tcz is already a dependence of gtk3.tcz, that's why it's not on the list.
If you expand the dependence tree, you'll see it.
My script take care of that by looping (not a good idea for big extensions).
As for nvidia-352.63-KERNEL.tcz (renamed cause the script, but tce-load can detect that as well)
Somehow ldd links these files to /usr/lib/libnvidia-glsi.so.352.63 (I knew that long ago, just couldn't figure out why)
crashreporter
libmozgk.so
libxul.so
updater
Finally, I have absolutely no clue where does the "Feedbacks" comes from, I never put such string in it.
/mnt/sda2/tc7-x86/optional $ getDepList -f /tmp/tcloop/*
/usr/local/bin/getDepList: line 204: Feedbacks: not found
/tmp/tcloop/firefox/usr/local/firefox $ getDepList /tmp/tcloop/firefox/
dbus-glib.tcz
gtk3.tcz
libasound.tcz
nvidia-352.63-KERNEL.tcz
/usr/local/bin/getDepList: line 204: Feedbacks: not found
I hope that answers most of the questions, let me know if I miss something.