On Wed, 3 Sep 2014, Rob Owens wrote:
----- Original Message -----From: "Kelly Clowers" <kelly.clowers@gmail.com> On Tue, Sep 2, 2014 at 1:44 PM, Rob Owens <rowens@ptd.net> wrote:I'm trying to figure out, for example, what causes brasero to ultimately depend on systemd. I found a utility called debtree, but it produces too much output to be of use to me -- it shows all dependency chains starting at brasero, but I am only interested in the one that ends at systemd. Can anybody suggest another utility, or maybe the proper syntax to make debtree do what I want? Thanks -RobI just used vim to search through debtree's .dot output (for such a complex thing, way easier than trying to look at the image file), and then followed up by looking around in aptitude interactive mode.Thanks. That is much easier than looking at the image file! I'd still like to find a method to specify the start point and end point, and get output of a single dependency chain. If anybody knows a way, please post it.
seems like this pipeline $ apt-cache --recurse -i depends brasero |tac yields the elements in question, and in a convenient order (children before parents), but with a whole bunch of irrelevance interleaved. piping it to something like the following clears away the irrelevant parts: $ cat above_kludge #!/bin/bash pattrn=$1 while read line do if [[ $line =~ ^${pattrn}$ ]] # Found node C. then echo $line # Admit node C to output. pattrn=$line # Ground the pattern. else if [[ $line =~ [[:blank:]]${pattrn}$ ]] # Found node C listed # above its parent. then pattrn='[[:alnum:][:punct:]]*' # Seek the parent. fi fi done so, like this: $ apt-cache --recurse -i depends brasero |tac |above_kludge '.*systemd.*' libsystemd-login0 dbus udisks libgdu0 gvfs-daemons gvfs brasero while in general there might be multiple paths, above kludge will find just one of them. -wes