From b7f5b72137faba75c2299d7437589e9365a6e2d3 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 19 Jun 2023 07:13:52 +0000 Subject: [PATCH] eclass/eapi8-dosym: Sync with Gentoo It's from Gentoo commit 610b01ff117232fde9068a9e97e7355d6e53f2e4. --- .../third_party/portage-stable/eclass/eapi8-dosym.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/eapi8-dosym.eclass b/sdk_container/src/third_party/portage-stable/eclass/eapi8-dosym.eclass index 4e3977ef54..866c98c78d 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/eapi8-dosym.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/eapi8-dosym.eclass @@ -31,7 +31,7 @@ esac _dosym8_canonicalize() { local path slash i prev out IFS=/ - path=( $1 ) + read -r -d '' -a path < <(printf '%s\0' "$1") [[ $1 == /* ]] && slash=/ while true; do @@ -39,7 +39,7 @@ _dosym8_canonicalize() { # or as a special case, "/.." at the beginning of the path. # Also drop empty and "." path components as we go along. prev= - for i in ${!path[@]}; do + for i in "${!path[@]}"; do if [[ -z ${path[i]} || ${path[i]} == . ]]; then unset "path[i]" elif [[ ${path[i]} != .. ]]; then @@ -56,7 +56,7 @@ _dosym8_canonicalize() { done out="${slash}${path[*]}" - echo "${out:-.}" + printf "%s\n" "${out:-.}" } # @FUNCTION: dosym8