]> git.ipfire.org Git - pakfire.git/commitdiff
build: Drop the old find-requires script
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Jan 2025 13:57:30 +0000 (13:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Jan 2025 13:57:30 +0000 (13:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/pakfire/build.c
src/scripts/find-requires [deleted file]

index d5daa5df487288c7b34419e30db634e964bfcf66..a0a6d5d5a7b952ca3bb8eb3cddb04653b41f31e5 100644 (file)
@@ -1021,7 +1021,6 @@ tests_parser_test_LDADD = \
 dist_scripts_SCRIPTS = \
        src/scripts/compress-man-pages \
        src/scripts/find-prerequires \
-       src/scripts/find-requires \
        src/scripts/mkimage \
        src/scripts/perl.prov \
        src/scripts/perl.req
index 8a3c659b60597b5e0d4b6725de6542b868e55b21..88169e81bcfcd0afeb97f80199e14921e26d752d 100644 (file)
@@ -907,12 +907,6 @@ static int pakfire_build_find_dependencies(struct pakfire_build* build,
        if (r < 0)
                goto ERROR;
 
-       // XXX LEGACY CODE
-       r = pakfire_build_find_deps(build, pkg,
-               PAKFIRE_PKG_REQUIRES, "find-requires", filelist, 0);
-       if (r)
-               goto ERROR;
-
        // Find all Perl requires
        r = pakfire_build_find_deps(build, pkg,
                PAKFIRE_PKG_REQUIRES, "perl.req", filelist, PAKFIRE_FILE_PERL);
diff --git a/src/scripts/find-requires b/src/scripts/find-requires
deleted file mode 100644 (file)
index 8c46eaa..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-###############################################################################
-#                                                                             #
-# Pakfire - The IPFire package management system                              #
-# Copyright (C) 2021 Pakfire development team                                 #
-#                                                                             #
-# This program is free software: you can redistribute it and/or modify        #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation, either version 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program is distributed in the hope that it will be useful,             #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-error() {
-       echo "$@" >&2
-}
-
-find_script_interpreter() {
-       local file="${1}"
-
-       # Don't find interpreters for non-executable files
-       if [ ! -x "${file}" ]; then
-               return 0
-       fi
-
-       local first_line="$(grep -q "^#!" "${file}" && head -n1 "${file}")"
-
-       # Skip files that are not scripts
-       if [ "${first_line:0:2}" != "#!" ]; then
-               return 0
-       fi
-
-       local interpreter="${first_line:2}"
-
-       # Ignore anything that does not have an absolute path
-       if [ "${first_line:3:1}" != "/" ]; then
-               return 0
-       fi
-
-       case "${interpreter}" in
-               */perl)
-                       # XXX process perl files here
-                       ;;
-       esac
-
-       echo "${interpreter}"
-       return 0
-}
-
-main() {
-       local buildroot="${1}"
-
-       # Check if BUILDROOT exists
-       if [ ! -d "${buildroot}" ]; then
-               error "BUILDROOT (${buildroot}) does not exist"
-               return 1
-       fi
-
-       local file
-       while read -r file; do
-               # Filter out what we don't need
-               case "${file}" in
-                       # Debug files
-                       /usr/lib/debug/*|/usr/src/debug/*)
-                               continue
-                               ;;
-
-                       # Skip gconv
-                       /usr/lib*/gconv/*)
-                               continue
-                               ;;
-
-                       # Skip all kernel modules
-                       *.ko)
-                               continue
-                               ;;
-               esac
-
-               # Make the full path
-               local path="${buildroot}${file}"
-
-               # Process unresolvable symlinks
-               if [ -L "${path}" ]; then
-                       local link="$(readlink -m "${path}")"
-
-                       # Make link relative to buildroot
-                       link="${link#${buildroot}}"
-
-                       # If the destination is not in this package, we create a dependency for it
-                       echo "${link}"
-
-                       # We do not process symlinks any further
-                       continue
-               fi
-
-               # Skip anything that isn't a regular file
-               if [ ! -f "${path}" ]; then
-                       continue
-               fi
-
-               # Add script interpreters
-               if ! find_script_interpreter "${path}"; then
-                       return 1
-               fi
-       done | sort -u
-
-       return 0
-}
-
-main "$@" || exit $?