mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-24 16:10:05 -07:00
kiss: made fixdeps() aware of dependency chain
This commit is contained in:
parent
a1de34d781
commit
e76b71521c
30
kiss
30
kiss
@ -367,10 +367,18 @@ pkg_depends() {
|
||||
while read -r dep _ || [ "$dep" ]; do
|
||||
case $dep in
|
||||
[!#]*)
|
||||
case $2 in
|
||||
show-installed)
|
||||
pkg_depends "$dep" "$2"
|
||||
;;
|
||||
|
||||
*)
|
||||
pkg_list "$dep" >/dev/null 2>&1 ||
|
||||
pkg_depends "$dep"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done < "$repo_dir/depends"
|
||||
|
||||
# After child dependencies are added to the list,
|
||||
@ -436,6 +444,11 @@ pkg_fixdeps() {
|
||||
|
||||
: >> depends
|
||||
|
||||
# Generate list of all dependencies.
|
||||
deps="gcc llvm"
|
||||
pkg_depends "$pkg" show-installed
|
||||
deps="$deps $pkg ${pkg%%-bin} ${pkg%%-git}"
|
||||
|
||||
find "$pkg_dir/${PWD##*/}/" -type f 2>/dev/null |
|
||||
|
||||
while read -r file; do
|
||||
@ -464,21 +477,8 @@ pkg_fixdeps() {
|
||||
dep=${dep%/*}
|
||||
dep=${dep##*/}
|
||||
|
||||
# Skip listing some packages as dependencies.
|
||||
case $dep in
|
||||
gcc |\
|
||||
llvm |\
|
||||
"${pkg%%-bin}" |\
|
||||
"${pkg%%-esr}" |\
|
||||
"${pkg%%-esr-bin}" |\
|
||||
"")
|
||||
continue
|
||||
;;
|
||||
|
||||
*)
|
||||
printf '%s\n' "$dep"
|
||||
;;
|
||||
esac
|
||||
# Only list dependencies not mentioned in any (nested) depends file.
|
||||
contains "$deps" "$dep" || printf '%s\n' "$dep"
|
||||
done ||:
|
||||
done |
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user