I am in the process of building a live CD, and to reduce the size of the CD image I need to do without some packages. By default, recommended packages are installed and flipping that switch off turns the CD from bloated with junk I don't need (why would I need the QT4 designer because I am bundling a Python QT program?) to barely usable.
What would be ideal is some tool that takes a list of packages as input and crawls their dependency graph, following only "depends" links, but printing out the "recommends" links that it finds, effectively showing me the "top level" of recommended packages that would be installed based on the packages I fed into the tool. This would help me decide which of those packages need to be included, and then I can re-run the tool on that set of packages until there are no more that I need.
Other tools like apt-cache depends
will dump out everything, and if I grep for "Recommends" this will show me packages that recommended packages also recommend, which I do not want.
For example, if:
- A depends on B,
- B recommends C,
- C depends on D, and
- D recommends E.
If I ask this hypothetical tool about package A, then I would want it to give me only package C as the output -- I would not want E included, as I don't even know if I want C yet.
Is there such a tool out there, or is there a somewhat simple way to accomplish this with existing tools?