add bash-5.2.x compatibility
bash 5.2.x initializes shopt a bit different. Call it before the function and unset after the function.
Merge request reports
Activity
added 1 commit
- 9d1a6d72 - add shopt options around functions for bash 5.2.x compatibility
- Resolved by Levente Polyak
- Resolved by Tobias Powalowski
mapfile -t packages < <(printf "%s\n" "
dir"/"{targetname}"-"${targetver}"-"${targetarch}".pkg.tar?(.!(sig|.*)))try this expression and it fails.
Edited by Tobias Powalowski
https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00104.html I brought this up to the bash bug mailinglist. It's wanted behaviour and in 5.1 and lower, it was just working cause of luck.
Edited by Tobias Powalowski- Resolved by Levente Polyak
We might need this patch to the Makefile as well.
diff --git a/Makefile b/Makefile index 14ced32..cb9ce9d 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ $(1)/%: $(2)%.in $(LIBUTILS) @$(RM) "$$@" @{ echo -n 'm4_changequote([[[,]]])'; cat $$<; } | m4 -P --define=m4_devtools_version=$$(BUILDTOOLVER) | $(edit) >$$@ @chmod $(3) "$$@" - @bash -n "$$@" + @bash -O extglob -O nullglob -n "$$@" endef
Reported by Frédéric Pierret building devtools on Fedora.
You can cherry-pick it from fepitre/devtools@d01aca69.
added scoperegression statusin-progress labels
added 1 commit
- 7c1e514c - fix: enable extglob before func definition for bash-5.2 compatibility
added 1 commit
- c15be605 - fix: enable extglob before func definition for bash-5.2 compatibility
- Resolved by Levente Polyak
I don't like this. I think all
shopt
s should be moved to the start of the script and never unset.
added 3 commits
-
c15be605...4ff7aa0d - 2 commits from branch
archlinux:master
- 0365edb2 - fix: enable extglob before func definition for bash-5.2 compatibility
-
c15be605...4ff7aa0d - 2 commits from branch
enabled an automatic merge when the pipeline for 0365edb2 succeeds