From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 01FB715806E for ; Wed, 7 Jun 2023 09:03:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43E2FE07EA; Wed, 7 Jun 2023 09:03:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2819FE07EA for ; Wed, 7 Jun 2023 09:03:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 39584340D01 for ; Wed, 7 Jun 2023 09:03:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A01BE990 for ; Wed, 7 Jun 2023 09:03:10 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1686128185.610b01ff117232fde9068a9e97e7355d6e53f2e4.ulm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/, eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/eapi8-dosym.eclass eclass/tests/eapi8-dosym.sh X-VCS-Directories: eclass/tests/ eclass/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 610b01ff117232fde9068a9e97e7355d6e53f2e4 X-VCS-Branch: master Date: Wed, 7 Jun 2023 09:03:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eb0f32b9-3aef-44d7-9e37-206058f2363a X-Archives-Hash: 790c7047ee8ef01d0a9804c8f1305afa commit: 610b01ff117232fde9068a9e97e7355d6e53f2e4 Author: Ulrich Müller gentoo org> AuthorDate: Wed Jun 7 08:42:07 2023 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed Jun 7 08:56:25 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=610b01ff eapi8-dosym.eclass: Fix another corner case of strange input Signed-off-by: Ulrich Müller gentoo.org> eclass/eapi8-dosym.eclass | 4 ++-- eclass/tests/eapi8-dosym.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eclass/eapi8-dosym.eclass b/eclass/eapi8-dosym.eclass index e139b74cfea0..866c98c78d91 100644 --- a/eclass/eapi8-dosym.eclass +++ b/eclass/eapi8-dosym.eclass @@ -31,7 +31,7 @@ esac _dosym8_canonicalize() { local path slash i prev out IFS=/ - read -r -d '' -a path < <(echo -n "$1") + read -r -d '' -a path < <(printf '%s\0' "$1") [[ $1 == /* ]] && slash=/ while true; do @@ -56,7 +56,7 @@ _dosym8_canonicalize() { done out="${slash}${path[*]}" - echo "${out:-.}" + printf "%s\n" "${out:-.}" } # @FUNCTION: dosym8 diff --git a/eclass/tests/eapi8-dosym.sh b/eclass/tests/eapi8-dosym.sh index cae66e3bb2ee..a0f8961d4d96 100755 --- a/eclass/tests/eapi8-dosym.sh +++ b/eclass/tests/eapi8-dosym.sh @@ -54,6 +54,7 @@ teq foo _dosym8_canonicalize foo/. teq ../foo _dosym8_canonicalize ../foo teq ../baz _dosym8_canonicalize foo/bar/../../../baz teq '*' _dosym8_canonicalize '*' +teq '-e' _dosym8_canonicalize '-e' for f in ref_dosym_r "dosym8 -r"; do teq ../../bin/foo ${f} /bin/foo /usr/bin/foo