Skip to content
Snippets Groups Projects

add bash-5.2.x compatibility

Merged Tobias Powalowski requested to merge tpowa/devtools:bash-52 into master
All threads resolved!

bash 5.2.x initializes shopt a bit different. Call it before the function and unset after the function.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Contributor

    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.

  • Levente Polyak added 1 commit

    added 1 commit

    • 7c1e514c - fix: enable extglob before func definition for bash-5.2 compatibility

    Compare with previous version

  • Levente Polyak added 1 commit

    added 1 commit

    • c15be605 - fix: enable extglob before func definition for bash-5.2 compatibility

    Compare with previous version

  • Levente Polyak resolved all threads

    resolved all threads

  • Levente Polyak approved this merge request

    approved this merge request

  • Levente Polyak added 3 commits

    added 3 commits

    • c15be605...4ff7aa0d - 2 commits from branch archlinux:master
    • 0365edb2 - fix: enable extglob before func definition for bash-5.2 compatibility

    Compare with previous version

  • Levente Polyak enabled an automatic merge when the pipeline for 0365edb2 succeeds

    enabled an automatic merge when the pipeline for 0365edb2 succeeds

  • Please register or sign in to reply
    Loading