]> git.ipfire.org Git - pakfire.git/commitdiff
strip: Fix stripping hardlinked files
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jun 2021 09:51:34 +0000 (09:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jun 2021 09:51:34 +0000 (09:51 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/strip

index 2c69591591e612d137cbbe789580d887013caae0..3b29dea4f1463ce0efbb6ad0e774260782c94fed 100644 (file)
@@ -106,9 +106,11 @@ process_file() {
        # Create any hardlinks
        local link
        for link in $(find "${buildroot}" -not -path "${file}" -samefile "${file}"); do
-               mkdir -p "${link%/*}"
+               # Strip BUILDROOT
+               link="${link#${buildroot}}"
 
-               if ! ln "${file}" "${link}"; then
+               mkdir -p "${debug_dir}/${link%/*}"
+               if ! ln "${debug_dir}/${path}.debug" "${debug_dir}/${link}.debug"; then
                        return 1
                fi
        done