diff options
author | merakor <cem@ckyln.com> | 2021-02-22 12:56:16 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-02-22 12:56:16 +0000 |
commit | 4ad8a8fe29a21f2d417e5046d3ebe50757eedeb4 (patch) | |
tree | 7e863c5b657e9dbfd72733e9bb4df5ce6a61867f /src | |
parent | 0748e91bbe652bfbec098c94bc5de83623f137ee (diff) | |
download | cpt-4ad8a8fe29a21f2d417e5046d3ebe50757eedeb4.tar.gz |
pkg_get_base(): return the dependency tree as well
FossilOrigin-Name: 393a3a3099894625cffeec866889b3534b8b1d8866f4d967a73f3986101c55a4
Diffstat (limited to 'src')
-rw-r--r-- | src/cpt-lib.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 9590a85..692b9b5 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1868,6 +1868,12 @@ pkg_get_base() ( while read -r pkgname _; do [ "${pkgname##\#*}" ] || continue set -- "$@" "$pkgname" + while read -r dep; do + contains "$*" "$dep" && continue + set -- "$@" "$dep" + done <<EOF +$(pkg_gentree "$pkgname" x) +EOF done < "$CPT_ROOT/etc/cpt-base" if [ "$nonl" ]; then printf '%s ' "$@"; else printf '%s\n' "$@"; fi ) |