Reverse LDD (reverse dependency checker)

Miscellaneous tools
Post Reply
Message
Author
User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

Reverse LDD (reverse dependency checker)

#1 Post by sc0ttman »

Reverse-ldd

The 'ldd' command allows you to find the libs used by a particular program.
This is the reverse.

This tool allows you to right click on a lib (.so) file (in /lib, /usr/lib, /usr/local/lib, etc).
You can then find out which applications or programs are using the chosen lib file.

Lib files are things like /usr/lib/libpango.so.1.0 and so on....

This tool will (after a short wait) present you with a list of the apps which depend on your chosen lib, in your default text editor. :)

It requires tclsh (the tcl/tk shell) and of course therefore tcl/tk itself.
But don't worry, this is included in many Puppies by default.

And even if not, I have packaged "jimsh" in the pet file, which is a tiny tcl interpreter (61kb).

Warning!! This will replace "tclsh" with a link to jimtcl in /usr/bin!!
Backup /usr/bin/tclsh first (if you have it), before you install this!

NOTES:

You can type 'reverse-ldd /path/to/lib' in the terminal to run it that way...

This was built on puppy 4 (for Puplite) and regarding some threads around elsewhere, I'd thought I better share ;)
Attachments
rldd.jpg
screenshot of the ROX right click option
(38.39 KiB) Downloaded 1698 times
reverse-ldd.pet
reverse ldd
(78.3 KiB) Downloaded 758 times
Last edited by sc0ttman on Sat 16 Apr 2011, 12:15, edited 1 time in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#2 Post by trapster »

Quite handy!
Thank you.
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#3 Post by abushcrafter »

Thanks. Sounds just like what I have wanted.
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#4 Post by jpeps »

Another (simple) way is to just create an LDD list, and then search it for a particular lib.

USAGE: dll-finder [app-dir]
note: edit "ED" to preferred editor

Code: Select all

#!/bin/sh 

[ "$1" == "" ] && echo "USAGE: dll-finder [ app directory ]" && exit
ED="vim"

DIR="$1"
[ -f /tmp/files ] && rm /tmp/files
[ -f /tmp/ldd-apps ] && rm /tmp/ldd-apps
cd "$1"
sudo ls >>/tmp/files
while read line; do
VAR="$(sudo ldd "$line")"
echo "----${line}_____" >>/tmp/ldd-apps

[ "$VAR" ] &&  echo "$VAR" >>/tmp/ldd-apps
done < /tmp/files

rm /tmp/files
"$ED" /tmp/ldd-apps 

Post Reply