kiss: pkg_fix_deps less indentation

This commit is contained in:
Dylan Araps 2021-07-05 13:16:37 +03:00
parent f9bf8816f2
commit cbc638ac11
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

64
kiss
View File

@ -527,43 +527,41 @@ pkg_fix_deps() {
continue continue
while read -r line || [ "$line" ]; do while read -r line || [ "$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] line=${line##*\[}
line=${line##*\[} line=${line%%\]*}
line=${line%%\]*}
# Resolve library path. # Resolve library path.
# ldd: libjson-c.so.5 => /lib/libjson-c.so.5 ... # ldd: libjson-c.so.5 => /lib/libjson-c.so.5 ...
case $cmd_elf in case $cmd_elf in
*readelf) line=${ldd_buf#*" $line => "} ;; *readelf) line=${ldd_buf#*" $line => "} ;;
*) line=${line##*=> } ;; *) line=${line##*=> } ;;
esac esac
line=${line%% *} line=${line%% *}
# Skip files owned by libc and POSIX. # Skip files owned by libc and POSIX.
case ${line##*/} in case ${line##*/} in
ld-* |\ ld-* |\
lib[cm].so* |\ lib[cm].so* |\
libdl.so* |\ libdl.so* |\
libpthread.so* |\ libpthread.so* |\
librt.so* |\ librt.so* |\
libtrace.so* |\ libtrace.so* |\
libxnet.so* |\ libxnet.so* |\
ldd) ldd)
continue
;;
*)
# Skip file if owned by current package
pkg_owner -l "/${line#/}\$" "$PWD/manifest" &&
continue continue
;;
*) pkg_owner -l "/${line#/}\$" "$@" &&
# Skip file if owned by current package printf '%s\n' "$pkg_owner"
pkg_owner -l "/${line#/}\$" "$PWD/manifest" && ;;
continue esac
pkg_owner -l "/${line#/}\$" "$@" &&
printf '%s\n' "$pkg_owner"
;;
esac
;;
esac esac
done <<EOF || : done <<EOF || :
${elf_buf:-"$ldd_buf"} ${elf_buf:-"$ldd_buf"}