mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-24 16:10:05 -07:00
kiss: fix_deps clean up
also fixed bug in pkg_installable and misc clean up
This commit is contained in:
parent
09f48044aa
commit
3d431fe22c
39
kiss
39
kiss
@ -519,20 +519,14 @@ pkg_fix_deps() {
|
|||||||
|
|
||||||
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 _fix_file; do
|
||||||
ldd_buf=$(ldd -- "$file" 2>/dev/null) || :
|
ldd_buf=$(ldd -- "$_fix_file" 2>/dev/null) ||
|
||||||
|
continue
|
||||||
|
|
||||||
case $cmd_elf in
|
elf_buf=${cmd_elf:+"$("$cmd_elf" -d "$_fix_file" 2>/dev/null)"} ||
|
||||||
*readelf)
|
continue
|
||||||
"$cmd_elf" -d "$file"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
while read -r line || [ "$line" ]; do
|
||||||
printf '%s\n' "$ldd_buf"
|
|
||||||
;;
|
|
||||||
esac 2>/dev/null |
|
|
||||||
|
|
||||||
while read -r line; do
|
|
||||||
case $line in
|
case $line in
|
||||||
*NEEDED*\[*\] | *'=>'*)
|
*NEEDED*\[*\] | *'=>'*)
|
||||||
# readelf: 0x0000 (NEEDED) Shared library: [libjson-c.so.5]
|
# readelf: 0x0000 (NEEDED) Shared library: [libjson-c.so.5]
|
||||||
@ -571,20 +565,17 @@ pkg_fix_deps() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done || :
|
done <<EOF || :
|
||||||
done |
|
${elf_buf:-"$ldd_buf"}
|
||||||
|
EOF
|
||||||
sort -uk1,1 depends - > "$tmp_dir/.fixdeps"
|
done | sort -uk1,1 depends - > "$tmp_dir/.fixdeps"
|
||||||
|
|
||||||
diff -U 3 depends - < "$tmp_dir/.fixdeps" || :
|
|
||||||
|
|
||||||
|
# If the depends file was modified, show a diff and replace it.
|
||||||
|
! [ -s "$tmp_dir/.fixdeps" ] || {
|
||||||
|
diff -U 3 depends - < "$tmp_dir/.fixdeps" 2>/dev/null || :
|
||||||
mv -f "$tmp_dir/.fixdeps" depends
|
mv -f "$tmp_dir/.fixdeps" depends
|
||||||
|
|
||||||
if [ -s depends ]; then
|
|
||||||
pkg_manifest "${PWD##*/}"
|
pkg_manifest "${PWD##*/}"
|
||||||
else
|
}
|
||||||
rm -f depends
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_manifest() (
|
pkg_manifest() (
|
||||||
@ -1237,7 +1228,7 @@ pkg_installable() {
|
|||||||
|
|
||||||
while read -r dep dep_type || [ "$dep" ]; do
|
while read -r dep dep_type || [ "$dep" ]; do
|
||||||
case $dep-$dep_type in
|
case $dep-$dep_type in
|
||||||
*-\#)
|
\#*-*)
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user