Artificial intelligent assistant

How do I display a dependency chain from one package to another? For example, I want to find out why `monodevelop` does depend on `systemd`. `apt-rdepends -r systemd` shows all packages that that directly or indirectly depend on systemd: $ apt-rdepends --dotty -r systemd | grep monodevelop "monodevelop" -> "libgnome2.24-cil"; ... `debtree monodevelop` shows all packages `monodevelop` depend on, directly or indirectly: $ debtree monodevelop | grep -- '-> "systemd"' "libpam-systemd" -> "systemd" [color=blue,label="(= 215-6)"]; ... But how do I easily show the chain from `monodevelop` to `systemd`? Example of one of the chains: monodevelop -> libgnome2.24-cil -> libgnome2-0 -> gvfs -> gvfs-daemons -> udisks2 -> libpam-systemd -> systemd

Developed a oneliner for this:


$ apt-rdepends --dot -r systemd | perl -ne 'our %chains; if(m!"([^"]+)" -> "([^"]+)"[^"]*;!) { my $c="$2 $chains{$2}"; $chains{$1}=$c; print "$1 $c\
" }' | grep '^monodevelop '
Reading package lists... Done
Building dependency tree
Reading state information... Done
monodevelop libgnome2.24-cil libgnomeui-0 libbonoboui2-0 libgnome2-0 gvfs gvfs-daemons udisks2 libpam-systemd systemd

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 12c3a8cfe0ebf586d0c906d4e2a1b351