[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script idea...

Ender Wigin wrote:
> Hi,
> I just (couple of weeks realy) upgraded to Hamm.
> After the upgrade I was left with a bunch of apps that core dumped ...(IE:
> ncftp) before I upgraded them to the libc6 version... So today in math
> class I thought up a neat script idea that could help others in my
> plight... (note extenuating curcumstances in my case) Basicly my idea is
> to run "ldd * | grep 'libc.so.5' | tail libc5apps" on the bin directorys
> ...now for the questions. one: I realy think that there is probaly a
> better way to do this ... (Ideas?) Two: I would like to somehow link this
> to the Contents file so that indivigual executibles are not listed as
> things to upgrade, but the packages ... IE step one get list of lib5 apps,
> two grep aginst contents to get a package name providing that app. only I
> don't know how to do step 2 execpt manualy ... any ideas here ... I figure
> one of you perl gurus would know how to do this ... ?

I did something similar when I was converting from a.out to an elf
system.  It would be a very simple matter to adapt this to searching for
libc5 dependencies.


# findaout - Find a.out executables and libraries on a Debian system
# Written by: Behan Webster <behanw@verisim.com>

DIRS="/ -xdev"

if [ $# -eq 1 ] ; then
elif [ $# -gt 1 ] ; then
    echo "Usage: `basename $0` [filename]"
    exit 1

if [ -f $FILE ] ; then
    echo "Saving old $FILE files..."
    savelog -c 8 -m 644 $FILE >/dev/null

echo "Putting list of a.out packages in $FILE..."
        nice -n +18 find $DIRS -type f -perm +111 | xargs file
    ) | egrep 'Linux/i386.*MAGIC' | cut -d: -f1 | xargs dpkg -S
) | cut -d: -f1 | sort -u > $FILE

echo "Done."

Behan Webster     mailto:behanw@verisim.com
+1-613-224-7547   http://www.verisim.com/

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: