From b17be5bbe819beaf7190349f71e54b2a7998bbb1 Mon Sep 17 00:00:00 2001 From: Debian Rust Maintainers Date: Thu, 14 Jul 2022 13:17:38 +0200 Subject: [PATCH] Install symlinks as-is, don't dereference them Our patch to mdbook installs symlinks to systems versions of font-awesome, highlight, etc. Upstream mdbook otherwise doesn't use symlinks, so this doesn't affect anything else that's already generated. Forwarded: not-needed Gbp-Pq: Topic build Gbp-Pq: Name d-bootstrap-install-symlinks.patch --- src/tools/rust-installer/install-template.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh index c4f0c618a5..b7f095918d 100644 --- a/src/tools/rust-installer/install-template.sh +++ b/src/tools/rust-installer/install-template.sh @@ -610,7 +610,13 @@ install_components() { maybe_backup_path "$_file_install_path" + # Debian copy symlinks as-is, instead of dereferencing them + if [ -h "$_src_dir/$_component/$_file" ] + then + run cp -d "$_src_dir/$_component/$_file" "$_file_install_path" + else run cp "$_src_dir/$_component/$_file" "$_file_install_path" + fi if $_is_bin || test -x "$_src_dir/$_component/$_file"; then run chmod 755 "$_file_install_path" else @@ -630,7 +636,7 @@ install_components() { maybe_backup_path "$_file_install_path" - run cp -R "$_src_dir/$_component/$_file" "$_file_install_path" + run cp -dR "$_src_dir/$_component/$_file" "$_file_install_path" critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files -- 2.30.2