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
36
kiss
36
kiss
@ -367,8 +367,16 @@ pkg_depends() {
|
|||||||
while read -r dep _ || [ "$dep" ]; do
|
while read -r dep _ || [ "$dep" ]; do
|
||||||
case $dep in
|
case $dep in
|
||||||
[!#]*)
|
[!#]*)
|
||||||
pkg_list "$dep" >/dev/null 2>&1 ||
|
case $2 in
|
||||||
pkg_depends "$dep"
|
show-installed)
|
||||||
|
pkg_depends "$dep" "$2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
pkg_list "$dep" >/dev/null 2>&1 ||
|
||||||
|
pkg_depends "$dep"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done < "$repo_dir/depends"
|
done < "$repo_dir/depends"
|
||||||
@ -417,7 +425,7 @@ pkg_strip() {
|
|||||||
# symbol entries which makes this safe to do.
|
# symbol entries which makes this safe to do.
|
||||||
*177*E*L*F*0000020\ 00[23]\ *)
|
*177*E*L*F*0000020\ 00[23]\ *)
|
||||||
strip -s -R .comment -R .note "$file"
|
strip -s -R .comment -R .note "$file"
|
||||||
printf 'stripped all .%s\n' "${file##"$pkg_dir/$1"}"
|
printf 'stripped all .%s\n' "${file##"$pkg_dir/$1"}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done 2>/dev/null ||:
|
done 2>/dev/null ||:
|
||||||
@ -436,6 +444,11 @@ pkg_fixdeps() {
|
|||||||
|
|
||||||
: >> depends
|
: >> 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 |
|
find "$pkg_dir/${PWD##*/}/" -type f 2>/dev/null |
|
||||||
|
|
||||||
while read -r file; do
|
while read -r file; do
|
||||||
@ -464,21 +477,8 @@ pkg_fixdeps() {
|
|||||||
dep=${dep%/*}
|
dep=${dep%/*}
|
||||||
dep=${dep##*/}
|
dep=${dep##*/}
|
||||||
|
|
||||||
# Skip listing some packages as dependencies.
|
# Only list dependencies not mentioned in any (nested) depends file.
|
||||||
case $dep in
|
contains "$deps" "$dep" || printf '%s\n' "$dep"
|
||||||
gcc |\
|
|
||||||
llvm |\
|
|
||||||
"${pkg%%-bin}" |\
|
|
||||||
"${pkg%%-esr}" |\
|
|
||||||
"${pkg%%-esr-bin}" |\
|
|
||||||
"")
|
|
||||||
continue
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
printf '%s\n' "$dep"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done ||:
|
done ||:
|
||||||
done |
|
done |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user