On 02/14/2007 08:35 PM, Tony Heal wrote:
I am working on a script to back trace debian package (program) dependencies.
Here is how the systems works

Package A needs packages D,E & F installed before it will install

Package D needs package G, H & I installed before it will install

Package G needs package C, J & K installed before it will install

Package C needs package Y installed before it will install

Given a list of package names and their dependencies

How can I prove that package A actually depends on package Y

For those who may be curious here id the format that the list is in. There are 
other elements (Priority: Section:
Installed-Size: Maintainer: Architecture: Source:-) and still more, but Package 
and Depends are the one I need to use to
do this

Package: xpdf-utils

Depends: libc6 (>= 2.3.6-6), libgcc1 (>= 1:4.1.0), libpaper1, libstdc++6 (>= 
4.1.0), xpdf-common (= 3.01-9)

Any help would be great. Thanks

Tony



What do you mean by "prove"? If all you want is to list the reverse dependencies for xpdf-utils, you can use aptitude:

aptitude search '~Rxpdf-utils'

See the aptitude documentation in /usr/share/doc/aptitude (on a Debian system).

If you want to "prove" that the dependencies listed by aptitude are correct, that goes beyond my knowledge.

ObPerl:

If you only want to list the packages in the reverse dependencies output, you might do this:

aptitude search '~Rxpdf-utils' | perl -nle 'print +(/^.{4}(\w+)/)[0]'

although using the -F option is better :-P



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to