From: Michael Tremer Date: Sat, 12 Jun 2021 09:51:34 +0000 (+0000) Subject: strip: Fix stripping hardlinked files X-Git-Tag: 0.9.28~1270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d9722a4165a870fac1c78587e86031469ff0e90;p=pakfire.git strip: Fix stripping hardlinked files Signed-off-by: Michael Tremer --- diff --git a/src/scripts/strip b/src/scripts/strip index 2c6959159..3b29dea4f 100644 --- a/src/scripts/strip +++ b/src/scripts/strip @@ -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