From: Debian Rust Maintainers Date: Thu, 14 Jul 2022 11:17:38 +0000 (+0200) Subject: Install symlinks as-is, don't dereference them X-Git-Tag: archive/raspbian/1.81.0+dfsg1-2+rpi1~1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ba6f45a271e16b5775d8266a3fea39b44e49c6c9;p=rustc.git 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 --- diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh index b477c3eac3..fd93316371 100644 --- a/src/tools/rust-installer/install-template.sh +++ b/src/tools/rust-installer/install-template.sh @@ -617,7 +617,10 @@ install_components() { maybe_backup_path "$_file_install_path" - if echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" + if [ -h "$_src_dir/$_component/$_file" ] + then + run cp -d "$_src_dir/$_component/$_file" "$_file_install_path" + elif echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" then run cp "$_src_dir/$_component/$_file" "$_file_install_path" run chmod 755 "$_file_install_path" @@ -639,7 +642,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