You are not logged in.
Pactree only seems to work for installed packages so I was wondering if there was any alternative that could work with any package (installed or not).
Last edited by anonymous_user (2011-07-09 14:46:05)
Offline
Well it's not as fast as pactree but I hacked this together for you:
#!/bin/bash
pactree () {
echo "$2|--$1" | cut -c4-
for dep in $(pacman -Si $1 2>/dev/null | awk -F':' '/Depends On/ { print $2 }')
do
dep=$(echo $dep | egrep -o "^[a-z0-9._-]+")
[[ -n $dep ]] && pactree $dep "$2| "
done
}
pactree $1 ""
Perhaps you should replace the occurences of "pactree" with something else.
Edit: Prettier output.
Last edited by Lars Stokholm (2011-07-09 09:22:52)
Offline
https://bbs.archlinux.org/viewtopic.php … 67#p904267
God, I need some coffee. This finds the reverse dependencies.
You need to change %N to %E like so
for pkg in $(expac -S '%E' $1); do
to find dependencies.
Last edited by karol (2011-07-09 09:10:20)
Offline
Thank you both
Offline