From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= Subject: [PATCHv2 2/2] gnu: bash-completion: Update to 2.3. Update the patch. Date: Sun, 7 Aug 2016 12:07:15 +0200 Message-ID: <20160807100715.14652-2-sleep_walker@gnu.org> References: <20160807080633.ftxxgx7xf7mnfd4d@venom> <20160807100715.14652-1-sleep_walker@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWKzM-0000ER-ND for guix-devel@gnu.org; Sun, 07 Aug 2016 06:07:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWKzK-0005gp-R3 for guix-devel@gnu.org; Sun, 07 Aug 2016 06:07:24 -0400 In-Reply-To: <20160807100715.14652-1-sleep_walker@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/bash.scm(bash-completion): Update to 2.3. * gnu/packages/patches/bash-completion-directories.patch: New version of the patch for the same purpose. --- gnu/packages/bash.scm | 8 ++--- .../patches/bash-completion-directories.patch | 40 +++++++++------------- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index c006546..bddb830 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -275,15 +275,15 @@ without modification.") (define-public bash-completion (package (name "bash-completion") - (version "2.1") + (version "2.3") (source (origin (method url-fetch) (uri (string-append - "http://bash-completion.alioth.debian.org/files/" - "bash-completion-" version ".tar.bz2")) + "https://github.com/scop/" name "/releases/download/" + version "/" name "-" version ".tar.xz")) (sha256 (base32 - "0kxf8s5bw7y50x0ksb77d3kv0dwadixhybl818w27y6mlw26hq1b")) + "1sg82nmsr00ig37skln2qvmi8mgbxgdvycm3ygzs8gbz66pq3q5j")) (patches (search-patches "bash-completion-directories.patch")))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/bash-completion-directories.patch b/gnu/packages/patches/bash-completion-directories.patch index 1a3e2f5..351a8e0 100644 --- a/gnu/packages/patches/bash-completion-directories.patch +++ b/gnu/packages/patches/bash-completion-directories.patch @@ -7,27 +7,21 @@ On Guix systems, we want not only to search within bash-completion's own directory, but also in the user's profile and in the system profile. This is what this patch does. ---- bash-completion-2.1/bash_completion 2015-03-11 09:45:45.056846446 +0100 -+++ bash-completion-2.1/bash_completion 2015-03-11 09:52:43.248159504 +0100 -@@ -1928,9 +1928,20 @@ _completion_loader() - local compfile=./completions - [[ $BASH_SOURCE == */* ]] && compfile="${BASH_SOURCE%/*}/completions" - compfile+="/${1##*/}" -+ local base="${1##*/}" - -+ # Look for completion files in the user and global profiles and -+ # lastly in 'bash-completion' itself. -+ for file in \ -+ "$HOME/.guix-profile/share/bash-completion/completions/$base" \ -+ "$HOME/.guix-profile/etc/bash_completion.d/$base" \ -+ "/run/current-system/profile/share/bash-completion/completions/$base" \ -+ "/run/current-system/profile/etc/bash_completion.d/$base" \ -+ "$compfile" -+ do - # Avoid trying to source dirs; https://bugzilla.redhat.com/903540 -- [[ -f "$compfile" ]] && . "$compfile" &>/dev/null && return 124 -+ [[ -f "$file" ]] && . "$file" &>/dev/null && return 124 -+ done + +--- a/bash_completion 2016-08-03 10:23:02.356782287 +0200 ++++ b/bash_completion 2016-08-03 10:27:50.120140403 +0200 +@@ -1960,7 +1960,13 @@ - # Need to define *something*, otherwise there will be no completion at all. - complete -F _minimal "$1" && return 124 + __load_completion() + { +- local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions ) ++ local -a dirs=( ++ "$HOME/.guix-profile/share/bash-completion/completions/$base" ++ "$HOME/.guix-profile/etc/bash_completion.d/$base" ++ "/run/current-system/profile/share/bash-completion/completions/$base" ++ "/run/current-system/profile/etc/bash_completion.d/$base" ++ ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions ) ++ + local OIFS=$IFS IFS=: dir cmd="$1" compfile + for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do + dirs+=( $dir/bash-completion/completions ) -- 2.9.2