From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/ncdu/
Date: Tue, 27 Jun 2023 15:05:30 +0000 (UTC) [thread overview]
Message-ID: <1687878175.028a9bb68a31af8a43d2c1ce49fbbf3735a978e9.flow@gentoo> (raw)
commit: 028a9bb68a31af8a43d2c1ce49fbbf3735a978e9
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jun 26 08:03:56 2023 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 15:02:55 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=028a9bb6
sys-fs/ncdu: refrain from using compgen to locate zig
The availability of the compgen builtin depends on whether bash was
compiled with --enable-readline. As such, it is sensible to avoid it in
scripts intended for non-interactive shells.
Though it would have been straightforward to mimic the behaviour of
compgen -c, let's just search ${BROOT}/usr/bin instead. From what I can
gather, both dev-lang/zig and dev-lang/zig-bin install a (versioned)
symlink to /usr/bin, with there being no apparent need to search
elsewhere.
While at it, address an error of logic whereby ZIG_VER was defined as
the value of ver, rather than selected_ver.
Closes: https://bugs.gentoo.org/909163
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
sys-fs/ncdu/ncdu-2.2.2-r1.ebuild | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild b/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild
index 74c745fa8f11..fde041c1e0f4 100644
--- a/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild
+++ b/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild
@@ -49,21 +49,14 @@ zig-set_EZIG() {
return
fi
- local candidates candidate selected selected_ver
+ local candidate selected selected_ver ver
- candidates=$(compgen -c zig-)
-
- for candidate in ${candidates}; do
- if [[ ! ${candidate} =~ zig(-bin)?-([.0-9]+) ]]; then
+ for candidate in "${BROOT}"/usr/bin/zig-*; do
+ if [[ ! -L ${candidate} || ${candidate} != */zig?(-bin)-+([0-9.]) ]]; then
continue
fi
- local ver
- if (( ${#BASH_REMATCH[@]} == 3 )); then
- ver="${BASH_REMATCH[2]}"
- else
- ver="${BASH_REMATCH[1]}"
- fi
+ ver=${candidate##*-}
if [[ -n ${EZIG_EXACT_VER} ]]; then
ver_test "${ver}" -ne "${EZIG_EXACT_VER}" && continue
@@ -96,11 +89,11 @@ zig-set_EZIG() {
done
if [[ -z ${selected} ]]; then
- die "Could not find (suitable) zig installation in PATH"
+ die "Could not find (suitable) zig installation in ${BROOT}/usr/bin"
fi
export EZIG="${selected}"
- export EZIG_VER="${ver}"
+ export EZIG_VER="${selected_ver}"
}
# Invoke zig with the optionally provided arguments.
next reply other threads:[~2023-06-27 15:05 UTC|newest]
Thread overview: 118+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 15:05 Florian Schmaus [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-10 12:01 [gentoo-commits] repo/gentoo:master commit in: sys-fs/ncdu/ Jakov Smolić
2025-02-17 1:52 Sam James
2025-01-05 20:43 Jakov Smolić
2025-01-05 19:28 Sam James
2025-01-05 19:28 Sam James
2025-01-05 17:49 Arthur Zamarin
2025-01-05 17:49 Arthur Zamarin
2025-01-05 17:49 Arthur Zamarin
2025-01-05 17:49 Arthur Zamarin
2024-12-15 9:47 Sam James
2024-11-21 17:13 Jakov Smolić
2024-10-04 11:03 Jakov Smolić
2024-08-26 12:24 Jakov Smolić
2024-08-25 19:24 WANG Xuerui
2024-08-25 14:37 Sam James
2024-08-25 14:37 Sam James
2024-08-25 14:37 Sam James
2024-08-25 14:37 Sam James
2024-08-25 13:59 Sam James
2024-08-25 13:59 Sam James
2024-08-23 2:08 Eli Schwartz
2024-08-23 2:08 Eli Schwartz
2024-07-27 15:26 Jakov Smolić
2024-06-18 17:50 Jakov Smolić
2024-06-09 10:37 Jakov Smolić
2023-12-12 23:22 Sam James
2023-12-12 17:51 Arthur Zamarin
2023-12-12 17:32 Arthur Zamarin
2023-12-12 16:55 Arthur Zamarin
2023-12-12 16:55 Arthur Zamarin
2023-12-12 15:56 Arthur Zamarin
2023-09-13 3:40 Sam James
2023-08-25 3:58 Jakov Smolić
2023-07-26 4:40 Sam James
2023-03-17 9:44 Florian Schmaus
2023-03-09 10:54 Florian Schmaus
2023-03-09 10:54 Florian Schmaus
2023-01-20 17:00 Sam James
2023-01-20 17:00 Sam James
2023-01-20 14:09 Arthur Zamarin
2023-01-20 14:09 Arthur Zamarin
2023-01-20 14:09 Arthur Zamarin
2023-01-20 14:09 Arthur Zamarin
2023-01-20 3:54 Sam James
2023-01-20 1:17 Sam James
2022-12-11 11:38 Jakov Smolić
2022-12-01 13:57 Michał Górny
2022-11-25 1:31 Jakov Smolić
2022-11-25 1:31 Jakov Smolić
2022-11-25 1:31 Jakov Smolić
2022-11-08 4:09 Sam James
2022-10-29 11:03 Jakov Smolić
2022-10-19 8:58 Jakov Smolić
2022-10-19 8:58 Jakov Smolić
2022-10-01 6:19 Arthur Zamarin
2022-09-14 19:18 Arthur Zamarin
2022-08-27 16:03 Sam James
2022-08-27 16:03 Sam James
2022-08-27 15:53 Jakov Smolić
2022-08-27 15:49 Arthur Zamarin
2022-08-27 15:49 Arthur Zamarin
2022-08-22 8:18 Jakov Smolić
2022-06-07 7:04 Jakov Smolić
2022-06-06 14:30 Jakov Smolić
2022-06-05 16:45 Jakov Smolić
2022-06-05 16:21 Jakov Smolić
2022-06-05 15:28 Jakov Smolić
2022-06-05 15:28 Jakov Smolić
2022-06-05 15:28 Jakov Smolić
2022-06-05 14:23 Jakov Smolić
2022-06-05 14:20 Jakov Smolić
2022-06-05 14:20 Jakov Smolić
2022-06-05 13:37 Jakov Smolić
2022-05-25 16:50 Jakov Smolić
2021-07-17 21:30 David Seifert
2021-07-06 23:44 Thomas Deutschmann
2021-05-07 19:49 Thomas Deutschmann
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 17:08 Thomas Deutschmann
2020-06-14 23:30 Thomas Deutschmann
2020-06-01 19:23 Thomas Deutschmann
2020-06-01 19:23 Thomas Deutschmann
2020-06-01 19:23 Thomas Deutschmann
2020-02-14 15:08 Thomas Deutschmann
2019-12-31 3:17 Thomas Deutschmann
2019-12-31 3:17 Thomas Deutschmann
2019-12-24 15:18 Mikle Kolyada
2019-12-10 10:54 Agostino Sarubbo
2019-12-09 12:10 Agostino Sarubbo
2019-12-09 8:48 Agostino Sarubbo
2019-12-04 13:05 Agostino Sarubbo
2019-12-04 0:56 Aaron Bauman
2019-08-07 19:12 Thomas Deutschmann
2019-02-09 15:37 Thomas Deutschmann
2018-11-26 19:22 Thomas Deutschmann
2018-11-26 19:22 Thomas Deutschmann
2018-11-11 10:09 Mikle Kolyada
2018-10-14 9:14 Sergei Trofimovich
2018-10-14 8:59 Sergei Trofimovich
2018-10-13 6:56 Tobias Klausmann
2018-07-09 15:53 Mikle Kolyada
2018-07-02 10:38 Mart Raudsepp
2018-07-02 0:49 Thomas Deutschmann
2018-02-16 21:51 Michael Weber
2018-02-12 11:11 Patrice Clement
2017-03-02 10:47 Agostino Sarubbo
2017-03-01 13:43 Tobias Klausmann
2017-02-28 23:43 Michael Weber
2017-02-13 0:08 Michael Weber
2016-08-29 14:02 Jeroen Roovers
2016-03-23 16:03 Mike Frysinger
2015-09-01 16:08 Markus Meier
2015-08-16 10:59 Justin Lecher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1687878175.028a9bb68a31af8a43d2c1ce49fbbf3735a978e9.flow@gentoo \
--to=flow@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox