summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-08-07 22:41:18 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-08-08 18:24:46 +0300
commitc791769511e258167cd0e7312f44ee5cb3e372ad (patch)
tree10fd7938195eed91c536ae66f502433e88afd175 /gnu
parent1ff4fef763f1bbbffc7f996fce15640aa79b445b (diff)
downloadguix-c791769511e258167cd0e7312f44ee5cb3e372ad.tar.gz
gnu: bash-completion: Update to 2.11.
* gnu/packages/bash.scm (bash-completion): Update to 2.11.
[arguments]: Disable tests.
* gnu/packages/patches/bash-completion-directories.patch: Update to
changes in upstream code.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bash.scm7
-rw-r--r--gnu/packages/patches/bash-completion-directories.patch7
2 files changed, 8 insertions, 6 deletions
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index b05e22d15d..97891f5cb6 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -298,7 +298,7 @@ variant logs the history to syslog.")))
 (define-public bash-completion
   (package
     (name "bash-completion")
-    (version "2.8")
+    (version "2.11")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -306,13 +306,14 @@ variant logs the history to syslog.")))
                     version "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0kgmflrr1ga9wfk770vmakna3nj46ylb5ky9ipd0v2k9ymq5a7y0"))
+                "1b0iz7da1sgifx1a5wdyx1kxbzys53v0kyk8nhxfipllmm5qka3k"))
               (patches
                (search-patches "bash-completion-directories.patch"))))
     (build-system gnu-build-system)
     (native-inputs (list util-linux))
     (arguments
-     `(#:phases (modify-phases %standard-phases
+     `(#:tests? #f      ; Unclear how to make tests pass.
+       #:phases (modify-phases %standard-phases
                   (add-after
                    'install 'remove-redundant-completions
                    (lambda* (#:key
diff --git a/gnu/packages/patches/bash-completion-directories.patch b/gnu/packages/patches/bash-completion-directories.patch
index 021e34653b..798f51154c 100644
--- a/gnu/packages/patches/bash-completion-directories.patch
+++ b/gnu/packages/patches/bash-completion-directories.patch
@@ -10,11 +10,11 @@ This is what this patch does.
 
 --- a/bash_completion
 +++ b/bash_completion
-@@ -2016,7 +2016,13 @@ complete -F _minimal ''
+@@ -2173,7 +2173,13 @@ complete -F _minimal ''
  
  __load_completion()
  {
--    local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
+-    local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions)
 +    local -a dirs=(
 +        ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions
 +        "$HOME/.guix-profile/share/bash-completion/completions/$base"
@@ -22,6 +22,7 @@ This is what this patch does.
 +        "/run/current-system/profile/share/bash-completion/completions/$base"
 +        "/run/current-system/profile/etc/bash_completion.d/$base" )
 +
-     local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile
+     local ifs=$IFS IFS=: dir cmd="${1##*/}" compfile
+     [[ -n $cmd ]] || return 1
      for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
          dirs+=( $dir/bash-completion/completions )