Add more tools to path_without, add binutils dependency

This commit is contained in:
Ivan Pozdeev 2026-08-15 20:18:52 +03:00
parent 413d1d03e9
commit ff71464787
4 changed files with 3 additions and 7 deletions

View file

@ -92,7 +92,7 @@ fi
if [ "$os" = "Linux" ]; then
libc="$(getconf GNU_LIBC_VERSION 2>/dev/null || true)"
fi
if [ "$os" != "Darwin" ] && ! LC_ALL=C readelf --version >/dev/null 2>&1; then
if [ "$os" != "Darwin" ] && ! LC_ALL=C readelf --version &>/dev/null; then
echo "pyenv-binary: need readelf to inspect shared libraries" >&2
exit 1
fi

View file

@ -2,10 +2,6 @@
load test_helper
_setup() {
create_path_executable readelf "exit 0"
}
create_version() {
mkdir -p "${PYENV_ROOT}/versions/$1/bin"
}

View file

@ -12,7 +12,7 @@ FROM bash:$BASH
apk add sed coreutils findutils \
;fi
# Bats
RUN apk add --update parallel ncurses git \
RUN apk add --update parallel ncurses git binutils \
&& mkdir -p ~/.parallel \
&& touch ~/.parallel/will-cite
COPY --from=bats /root/bats-core /root/bats-core

View file

@ -165,7 +165,7 @@ path_without() {
if [ "$found" != "${PYENV_ROOT}/shims" ]; then
alt="${PYENV_TEST_DIR}/$(echo "${found#/}" | tr '/' '-')"
mkdir -p "$alt"
for util in basename bash cut greadlink head mkdir readlink sed sort tr xargs; do
for util in basename bash cut dirname find greadlink gzip head mkdir readlink sed sort tar tr xargs; do
if [ -x "${found}/$util" ]; then
ln -s "${found}/$util" "${alt}/$util"
fi