summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/ptxd_make_xpkg_pkg.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 68691c2fd..7812dfa91 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -131,7 +131,18 @@ ptxd_install_file_strip() {
*) ptxd_bailout "${FUNCNAME}: invalid values for strip='${strip}' or ptx_use_sstrip='${ptx_use_sstrip}'" ;;
esac
- "${strip_cmd[@]}" "${@}"
+ #
+ # create hardlink so that inode stays the same during strip
+ # (fixes 64 bit fakeroot <-> 32 bit strip issue)
+ #
+ local tmp="strip"
+ local file
+ for file in "${@}"; do
+ ln -f "${file}" "${file}.${tmp}" || return
+ done &&
+
+ "${strip_cmd[@]}" "${@}" &&
+ rm -f "${@/%/.${tmp}}"
}
export -f ptxd_install_file_strip