bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash 5.2 breaks our Arch Linux devtools


From: Tobias Powalowski
Subject: Bash 5.2 breaks our Arch Linux devtools
Date: Wed, 15 Feb 2023 14:29:29 +0100

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt
-fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat
-Werror=format-security         -fstack-clash-protection -fcf-protection -g
-ffile-prefix-map=/build/bash/src=/usr/src/debug/bash -flto=auto
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc'
-DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS
uname output: Linux T-POWA-LX 6.1.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 14
Feb 2023 22:08:08 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.1
Patch Level: 16
Release Status: release

Description:
Hi,
latest 5.2.x seems to have introduced a change in shopt extglob:
https://gitlab.archlinux.org/archlinux/devtools/-/merge_requests/133
I'm not sure if my proposed fix for this is correct or if this is just a
bug in bash 5.2.x not checking the function for shopt first before bailing
out.
Repeat-By:
 Sample code from our gitlab:
% bash <<'EOF'

function x() {shopt -s extglobmapfile -t packages < <(printf "%s\n"
"dir"/"dir"/"dir"/"{targetname}"-"${targetver}"-"${targetarch}".pkg.tar?(.!(sig|.*)))shopt
-u extglob}xEOFResults in:

bash: line 3: syntax error near unexpected token `('

bash: line 3: `mapfile -t packages < <(printf "%s\n"
"dir"/"dir"/"dir"/"{targetname}"-"${targetver}"-"${targetarch}".pkg.tar?(.!(sig|.*)))'


Fix:

Putting shopt options outside the function, but is this the wanted
behaviour?
Thanks for clarification,
greetings
tpowa
-- 
Tobias Powalowski
Arch Linux Developer & Package Maintainer (tpowa)
https://www.archlinux.org <http://www.archlinux.org>
tpowa@archlinux.org
Archboot Developer
https://bit.ly/archboot

St. Martin-Apotheke
Herzog-Georg-Str. 25
89415 Lauingen
https://www.st-martin-apo.de
info@st-martin-apo.de


reply via email to

[Prev in Thread] Current Thread [Next in Thread]