2 # Pacman Dependency Tree
3 # does NOT handle group names -> unexpected results.
4 # Package names using aliases, like x-server, should work.
5 # Breaks on circular dependencies -> you better hit ctrl-c.
19 # Try to use specific pkg req
20 if $pacexec -Qi $1 &> /dev
/null
; then
21 # Grab deps list|from "Depends"|Remove Tag \| specific version req's.
22 deplist
=`$pacexec -Qi $1|grep Depends|sed 's/^.*: \|>[^ ]*//g;s/ $//'`
23 else # Oops! Failed on alias, try this...
24 deplist
=`$pacexec -Qs $1 | sed '1!d;s/\(^.*\/\)\(.*\)\( .*$\)/\2/'`
27 [ "x$deplist" = "x$leafnull" ] && return
29 while [ -n "$deplist" ]
31 set -- $deplist && echo "$branch$hbranch$1"
32 if [ $# -gt 1 ] ; then
33 branch
=${branch}$vbranch
35 branch
=${branch}$vprune
41 branch
=${branch:0:${#branch}-${#vprune}}
47 for pkg
in `$pacexec -Q $1 | sed 's/ .*//'`
53 unset _showdep
&& set --