]> git.ipfire.org Git - pakfire.git/commitdiff
scripts: Remove the old find-provides script
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Jan 2025 18:07:16 +0000 (18:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Jan 2025 18:07:16 +0000 (18:07 +0000)
All the functionality has been replaced.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/pakfire/build.c
src/scripts/find-provides [deleted file]

index d8843829ad7caa9b5f8f5fc538b7f4a24454ae50..d5daa5df487288c7b34419e30db634e964bfcf66 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-provides \
        src/scripts/find-requires \
        src/scripts/mkimage \
        src/scripts/perl.prov \
index 5ac262cc0d5e921abcc7307581d280c32aa94569..345c1aa83a81bc9881afbd852891a16bbb6cff53 100644 (file)
@@ -863,12 +863,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_PROVIDES, "find-provides", filelist, 0);
-       if (r)
-               goto ERROR;
-
        // Find all Perl provides
        r = pakfire_build_find_deps(build, pkg,
                PAKFIRE_PKG_PROVIDES, "perl.prov", filelist, PAKFIRE_FILE_PERL);
diff --git a/src/scripts/find-provides b/src/scripts/find-provides
deleted file mode 100644 (file)
index 0f0b003..0000000
+++ /dev/null
@@ -1,127 +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
-}
-
-FILTER_WEAK_PROVIDES='BEGIN { START=0; }
-       /Version definitions:/ { START=1; }
-       /^[0-9]/ && (START==1) { print $4; }
-       /^$/ { START=0; }'
-
-pkgconfig_provides() {
-       local file="${1}"
-
-       local n r v
-       while read -r n r v; do
-               echo "pkgconfig(${n}) ${r} ${v}"
-       done < <(pkg-config --print-provides "${file}" 2>/dev/null)
-
-       return 0
-}
-
-shared_object_provides() {
-       local file="${1}"
-
-       # Get SONAME
-       local soname="$(objdump -p "${file}" 2>/dev/null | awk '/SONAME/ { print $2 }')"
-
-       # If the files does not have a SONAME, we will simply use the basename
-       if [ -z "${soname}" ]; then
-               soname="$(basename "${file}")"
-       fi
-
-       local suffix
-
-       # Is this a 64 bit file?
-       if file -L "${file}" 2>/dev/null | grep -q "ELF 64-bit"; then
-               suffix="(64bit)"
-
-               echo "${soname}()${suffix}"
-       else
-               echo "${soname}"
-       fi
-
-       # Find weak symbol provides
-       while read -r symbol; do
-               echo "${soname}(${symbol})${suffix}"
-       done < <(objdump -p "${file}" 2>/dev/null | awk "${FILTER_WEAK_PROVIDES}")
-
-       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 shared objects in Python directories
-                       /usr/lib*/python*/*.so*)
-                               continue
-                               ;;
-
-                       # Skip gconv
-                       /usr/lib*/gconv/*)
-                               continue
-                               ;;
-               esac
-
-               # Make the full path
-               local path="${buildroot}${file}"
-
-               # Process special files
-               case "${file}" in
-                       # pkg-config
-                       *.pc)
-                               # Query provides of the package
-                               pkgconfig_provides "${path}"
-                               ;;
-
-                       # Shared objects
-                       *.so|*.so.*)
-                               # Skip symlinks
-                               if [ -L "${path}" ]; then
-                                       continue
-                               fi
-
-                               shared_object_provides "${path}"
-                               ;;
-               esac
-       done | sort -u
-
-       return 0
-}
-
-main "$@" || exit $?