kiss: clean up
This commit is contained in:
parent
9d01dfc3ae
commit
6b1c5d427f
11
kiss
11
kiss
|
@ -175,18 +175,15 @@ pkg_extract() {
|
||||||
pkg_depends() {
|
pkg_depends() {
|
||||||
# Resolve all dependencies and install them in the right order.
|
# Resolve all dependencies and install them in the right order.
|
||||||
|
|
||||||
repo_dir=$(pkg_find "$1")
|
|
||||||
|
|
||||||
# This does a depth-first search. The deepest dependencies are
|
# This does a depth-first search. The deepest dependencies are
|
||||||
# listed first and then the parents in reverse order.
|
# listed first and then the parents in reverse order.
|
||||||
contains "$deps" "$1" || {
|
contains "$deps" "$1" || {
|
||||||
# Recurse through the dependencies of the child
|
# Recurse through the dependencies of the child
|
||||||
# packages. Keep doing this.
|
# packages. Keep doing this.
|
||||||
[ -f "$repo_dir/depends" ] &&
|
while read -r dep _; do
|
||||||
while read -r dep _; do
|
[ "${dep##\#*}" ] || continue
|
||||||
[ "${dep##\#*}" ] || continue
|
pkg_depends "$dep" ||:
|
||||||
pkg_depends "$dep" ||:
|
done 2>/dev/null < "$(pkg_find "$1")/depends" ||:
|
||||||
done < "$repo_dir/depends"
|
|
||||||
|
|
||||||
# After child dependencies are added to the list,
|
# After child dependencies are added to the list,
|
||||||
# add the package which depends on them.
|
# add the package which depends on them.
|
||||||
|
|
Loading…
Reference in New Issue