summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2009-10-16 01:43:15 +0000
committerJeremy Olexa <darkside@gentoo.org>2009-10-16 01:43:15 +0000
commit1da0df50b95f1d50bd70f0e7737954947a790bdb (patch)
tree7f9e41af9ac6909109b93ebe6e76945df0e7dda0
parentDon't try to 2to3 some files (bug #289026). (diff)
downloadgentoo-2-1da0df50b95f1d50bd70f0e7737954947a790bdb.tar.gz
gentoo-2-1da0df50b95f1d50bd70f0e7737954947a790bdb.tar.bz2
gentoo-2-1da0df50b95f1d50bd70f0e7737954947a790bdb.zip
Fix my previous screwup. The base module exists again and hopefully works, bug 289240
(Portage version: 2.1.6.13/cvs/Linux x86_64)
-rw-r--r--app-shells/bash-completion/ChangeLog10
-rw-r--r--app-shells/bash-completion/bash-completion-1.1-r1.ebuild (renamed from app-shells/bash-completion/bash-completion-1.1.ebuild)14
-rw-r--r--app-shells/bash-completion/files/bash-completion.sh16
3 files changed, 28 insertions, 12 deletions
diff --git a/app-shells/bash-completion/ChangeLog b/app-shells/bash-completion/ChangeLog
index 1188bcb3654d..62c4466ed822 100644
--- a/app-shells/bash-completion/ChangeLog
+++ b/app-shells/bash-completion/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-shells/bash-completion
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.193 2009/10/15 13:52:35 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.194 2009/10/16 01:43:14 darkside Exp $
+
+*bash-completion-1.1-r1 (16 Oct 2009)
+
+ 16 Oct 2009; Jeremy Olexa <darkside@gentoo.org>
+ -bash-completion-1.1.ebuild, +bash-completion-1.1-r1.ebuild,
+ files/bash-completion.sh:
+ Fix my previous screwup. The base module exists again and hopefully works,
+ bug 289240
*bash-completion-1.1 (15 Oct 2009)
diff --git a/app-shells/bash-completion/bash-completion-1.1.ebuild b/app-shells/bash-completion/bash-completion-1.1-r1.ebuild
index cbf24f91d387..ba7664e4f42d 100644
--- a/app-shells/bash-completion/bash-completion-1.1.ebuild
+++ b/app-shells/bash-completion/bash-completion-1.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-1.1.ebuild,v 1.1 2009/10/15 13:52:35 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-1.1-r1.ebuild,v 1.1 2009/10/16 01:43:14 darkside Exp $
EAPI="2"
@@ -30,8 +30,16 @@ src_install() {
mv "${D}"/etc/bash_completion.d/* "${D}/usr/share/bash-completion/" \
|| die "installation failed to move files"
rm -r "${D}"/etc/bash_completion.d || die "rm failed"
- mv "${D}"/etc/bash_completion \
- "${D}/usr/share/bash-completion/.bash-completion" || die "mv failed"
+ awk -v D="$D" '
+ BEGIN { out=".pre" }
+ /^# A lot of the following one-liners/ { out="base" }
+ /^# start of section containing completion functions called by other functions/ { out=".pre" }
+ /^# start of section containing completion functions for external programs/ { out="base" }
+ /^# source completion directory/ { out="" }
+ /^unset -f have/ { out=".post" }
+ out != "" { print > D"/usr/share/bash-completion/"out }' \
+ bash_completion || die "failed to split bash_completion"
+
dodoc AUTHORS README TODO || die "dodocs failes"
}
diff --git a/app-shells/bash-completion/files/bash-completion.sh b/app-shells/bash-completion/files/bash-completion.sh
index aa84784ff74a..2ef091fc9cb3 100644
--- a/app-shells/bash-completion/files/bash-completion.sh
+++ b/app-shells/bash-completion/files/bash-completion.sh
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.4 2009/10/15 13:52:36 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.5 2009/10/16 01:43:15 darkside Exp $
# Check for interactive bash and that we haven't already been sourced.
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
@@ -9,22 +9,22 @@
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
_load_completions() {
- declare f x loaded_base=false
+ declare f x loaded_pre=false
for f; do
if [[ -f $f ]]; then
# Prevent loading base twice, initially and via glob
- if $loaded_base && [[ $f == */.bash-completion ]]; then
+ if $loaded_pre && [[ $f == */base ]]; then
continue
fi
# Some modules, including base, depend on the definitions
# in .pre. See the ebuild for how this is created.
- if ! $loaded_base; then
+ if ! $loaded_pre; then
if [[ ${BASH_COMPLETION-unset} == unset ]]; then
- BASH_COMPLETION=/usr/share/bash-completion/.bash-completion
+ BASH_COMPLETION=/usr/share/bash-completion/base
fi
- source /usr/share/bash-completion/.bash-completion
- loaded_base=true
+ source /usr/share/bash-completion/.pre
+ loaded_pre=true
fi
source "$f"
@@ -42,7 +42,7 @@ if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
# 4. Load user completion file last, overrides modules at user discretion
# This order is subject to change once upstream decides on something.
_load_completions \
- /usr/share/bash-completion/.bash-completion
+ /etc/bash_completion.d/base \
/etc/bash_completion.d/* \
~/.bash_completion.d/* \
~/.bash_completion