mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: cleanup
This commit is contained in:
parent
dd39d0e015
commit
dd37c86f71
32
kiss
32
kiss
@ -430,35 +430,47 @@ pkg_fixdeps() {
|
|||||||
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
|
||||||
# Run 'ldd' on the file and parse each line. The code then checks to
|
|
||||||
# see which packages own the linked libraries and it prints the result.
|
|
||||||
ldd "$file" 2>/dev/null | while read -r _ _ dep _; do
|
ldd "$file" 2>/dev/null | while read -r _ _ dep _; do
|
||||||
# Resolve path symlinks to find the real location to the library.
|
# Resolve path symlinks to find the real location to the library.
|
||||||
cd -P "${dep%/*}" 2>/dev/null || continue
|
cd -P "${dep%/*}" 2>/dev/null || continue
|
||||||
|
|
||||||
# Skip files owned by libc and POSIX.
|
# Skip files owned by libc and POSIX.
|
||||||
case ${dep##*/} in
|
case ${dep##*/} in
|
||||||
"" | ld-* | libpthread.so* | lib[cm].so* | libdl.so* |\
|
ld-* |\
|
||||||
librt.so* | libtrace.so* | libxnet.so*)
|
lib[cm].so* |\
|
||||||
|
libdl.so* |\
|
||||||
|
libpthread.so* |\
|
||||||
|
librt.so* |\
|
||||||
|
libtrace.so* |\
|
||||||
|
libxnet.so* |\
|
||||||
|
"")
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Figure out which package owns the file.
|
# Figure out which package owns the file.
|
||||||
dep=$(grep -lFx "${PWD#"$KISS_ROOT"}/${dep##*/}" "$@")
|
dep=$(grep -lFx "${PWD#"$KISS_ROOT"}/${dep##*/}" "$@")
|
||||||
dep=${dep%/*} dep=${dep##*/}
|
dep=${dep%/*}
|
||||||
|
dep=${dep##*/}
|
||||||
|
|
||||||
case $dep in
|
case $dep in
|
||||||
# Skip listing these packages as dependencies.
|
# Skip listing these packages as dependencies.
|
||||||
# The pkg_name portions are to workaround incorrect detections
|
gcc |\
|
||||||
# from -bin or -esr packages.
|
llvm |\
|
||||||
""|gcc|llvm|"${pkg_name%%-bin}"|\
|
"${pkg_name%%-bin}" |\
|
||||||
"${pkg_name%%-esr}"|"${pkg_name%%-esr-bin}") ;;
|
"${pkg_name%%-esr}" |\
|
||||||
|
"${pkg_name%%-esr-bin}" |\
|
||||||
|
"")
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
*) printf '%s\n' "$dep"
|
*) printf '%s\n' "$dep"
|
||||||
esac
|
esac
|
||||||
done ||:
|
done ||:
|
||||||
done | sort -uk1,1 depends - > "$mak_dir/d"
|
done |
|
||||||
|
|
||||||
|
sort -uk1,1 depends - > "$mak_dir/d"
|
||||||
|
|
||||||
# Display a 'diff' of the new dependencies against the old ones.
|
# Display a 'diff' of the new dependencies against the old ones.
|
||||||
diff -U 3 depends - < "$mak_dir/d" ||:
|
diff -U 3 depends - < "$mak_dir/d" ||:
|
||||||
|
Loading…
Reference in New Issue
Block a user