Having said that it would be a certain amount of work, I guess I couldn't
resist doing it.  It wasn't bad, really.  I did it for all the RPM packages
that came with SuSE 7.0, but it should work just as well with SLES7.  I'll
send the list of dependencies to whomever wants it, and to Rich off list.
It's about 23K uncompressed.

First, get a list of all the RPM packages on your installation media.  I
used my LCDS system, and mounted the .iso images on loopback devices to get
/mnt/cd1, /mnt/cd2, and /mnt/cd3.

cd /mnt
find . -name "*.rpm" | grep -v "full-names" | sort -k 5,5 -t/ > ~/rpm.list

Then, query each package and process the output:

for pkg in `cat ~/rpm.list`
  do base=`basename $pkg`
  echo -n Package $base": " >> ~/rpm.dep.list
  rpm -qRp $pkg | sed -e '/\//d' -e '/^lib.*so*/d' -e '/ld.so.1/d' |  \
     sed -e ': top' -e'{N;s%\n%%;}' -e 'b top' >> ~/rpm.dep.list
  echo >>~/rpm.dep.list
done

sed -e '/^$/d' -e 's/  / /g' -e 's/ $//' ~/rpm.dep.list > ~/dep.list

The various sed commands do things like remove program names, e.g.,
/bin/bash, library names such as libc.so.whatever, and put all the
dependencies for any package all on one line.  In part, the output looks
like this:
Package dump.rpm:
Package dvi2tty.rpm:
Package dviutils.rpm: tetex
Package dx.rpm: mesa lesstif tcsh
Package dxdata.rpm: dx
Package dxdoc.rpm: dx
Package eazy.rpm: gdbm
Package eb.rpm:
Package ebdev.rpm: eb = 2.3.8
Package eblook.rpm: eb
Package econf.rpm:

Mark Post


-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED]]On Behalf Of
Rich Smrcina
Sent: Sunday, December 22, 2002 9:56 AM
To: [EMAIL PROTECTED]
Subject: Determining dependencies


When installing SLES7 and having picked a configuration.  If a package is
de-selected from that configuration a dependencies dialog will come up
indicating that other packages depend on it.  How does one go about
determining which package(s) depend upon a deleted package?  The F2 (info)
screen is no help, it just tells me what I already know.

--
Rich Smrcina
Sytek Services, Inc.
Milwaukee, WI
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Catch the WAVV!  Stay for Requirements and the Free for All!
Update your S/390 skills in 4 days for a very reasonable price.
WAVV 2003 in Winston-Salem, NC.
April 25-29, 2003
For details see http://www.wavv.org

Reply via email to