From: Michael Tremer Date: Sat, 9 Sep 2023 13:06:48 +0000 (+0000) Subject: filter-requires: Remove check if files are on filelist X-Git-Tag: 0.9.29~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7cab40995eeedc742011614556179d91ba885df9;p=pakfire.git filter-requires: Remove check if files are on filelist This does not work in this place because we are streaming the filelist into the script and the check is being performed in Pakfire. Signed-off-by: Michael Tremer --- diff --git a/src/scripts/find-requires b/src/scripts/find-requires index 836b027c4..6c6858072 100644 --- a/src/scripts/find-requires +++ b/src/scripts/find-requires @@ -37,21 +37,6 @@ pkgconfig_requires() { return 0 } -is_file_on_filelist() { - local file="${1}" - local filelist="${2}" - - local line - while read -r line; do - if [ "${file}" = "${line}" ]; then - return 0 - fi - done < "${filelist}" - - # Nothing found - return 1 -} - find_elf_interpreter() { local file="${1}" local filelist="${2}" @@ -65,7 +50,7 @@ find_elf_interpreter() { grep "program interpreter" | tr -d "]" | awk '{ print $NF }')" # Only add interpreter if it isn't part of this package - if [ -n "${interpreter}" ] && ! is_file_on_filelist "${interpreter}" "${filelist}"; then + if [ -n "${interpreter}" ]; then echo "${interpreter}" fi @@ -182,9 +167,7 @@ main() { link="${link#${buildroot}}" # If the destination is not in this package, we create a dependency for it - if ! is_file_on_filelist "${link}" "${filelist}"; then - echo "${link}" - fi + echo "${link}" # We do not process symlinks any further continue