From dc44dff8d50d548c834f96e0a5cadf332ec0dcc7 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 23 Sep 2023 13:49:30 -0400 Subject: [PATCH] xbps-src: follow symlinks when fixing up pkg-config files Packages (e.g., python3-pybind11) that symlink to *.pc files in /usr/{lib,share}/pkgconfig will have those links overwritten with actual copies of the files after the hook common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh attempts to remove $XBPS_CROSS_BASE from paths. This will result in the new copy containing corrected paths, but the original file remaining uncorrected. This was stolen fro @tornaria. --- .../post-install/13-pkg-config-clean-xbps-cross-base-ref.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh b/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh index 5cdfb0e9bfd..88ad06c4198 100644 --- a/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh +++ b/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh @@ -16,7 +16,8 @@ hook() { # s,/usr/armv7l-linux-musleabihf/usr,/usr,g # trailing /usr to avoid clashing with # other $XBPS_CROSS_BASE and $XBPS_CROSS_TRIPLET. - sed -i -e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f" + sed -i --follow-symlinks \ + -e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f" fi done }