diff options
author | Aron Griffis <agriffis@gentoo.org> | 2006-11-22 14:54:21 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2006-11-22 14:54:21 +0000 |
commit | ca997b97f1805f9f7713c66aeff0e44da87876b2 (patch) | |
tree | a05d626fa12b1a49ff9336ead5de7a622c5799f4 /app-shells/bash-completion | |
parent | Marked ppc stable. (diff) | |
download | historical-ca997b97f1805f9f7713c66aeff0e44da87876b2.tar.gz historical-ca997b97f1805f9f7713c66aeff0e44da87876b2.tar.bz2 historical-ca997b97f1805f9f7713c66aeff0e44da87876b2.zip |
Fix bugs in files/bash-completion.sh, in particular default was renamed to
base during development but forgot to change it here
Package-Manager: portage-2.1.2_pre3-r1
Diffstat (limited to 'app-shells/bash-completion')
4 files changed, 116 insertions, 7 deletions
diff --git a/app-shells/bash-completion/ChangeLog b/app-shells/bash-completion/ChangeLog index 9dd00c78676b..20ec42e61fe0 100644 --- a/app-shells/bash-completion/ChangeLog +++ b/app-shells/bash-completion/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-shells/bash-completion # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.134 2006/11/20 23:06:15 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.135 2006/11/22 14:54:21 agriffis Exp $ + +*bash-completion-20060301-r2 (22 Nov 2006) + + 22 Nov 2006; Aron Griffis <agriffis@gentoo.org> files/bash-completion.sh, + -bash-completion-20060301-r1.ebuild, +bash-completion-20060301-r2.ebuild: + Fix bugs in files/bash-completion.sh, in particular default was renamed to + base during development but forgot to change it here *bash-completion-20060301-r1 (20 Nov 2006) diff --git a/app-shells/bash-completion/bash-completion-20060301-r2.ebuild b/app-shells/bash-completion/bash-completion-20060301-r2.ebuild new file mode 100644 index 000000000000..aa891ab7c3ae --- /dev/null +++ b/app-shells/bash-completion/bash-completion-20060301-r2.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-20060301-r2.ebuild,v 1.1 2006/11/22 14:54:21 agriffis Exp $ + +inherit eutils + +DESCRIPTION="Programmable Completion for bash" +HOMEPAGE="http://www.caliban.org/bash/index.shtml#completion" +SRC_URI="http://www.caliban.org/files/bash/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="app-admin/eselect + || ( + >=app-shells/bash-2.05a + app-shells/zsh + )" +PDEPEND="app-shells/gentoo-bashcomp" + +S="${WORKDIR}/${PN/-/_}" + +src_unpack() { + unpack ${A} + cd ${S} + EPATCH_SUFFIX="diff" epatch ${FILESDIR}/20050721 + EPATCH_SUFFIX="diff" epatch ${FILESDIR}/${PV} +} + +src_install() { + # split /etc/bash_completion into three parts: + # 1. /usr/share/bash-completion/.pre -- hidden from eselect + # 2. /usr/share/bash-completion/default -- eselectable + # 3. /usr/share/bash-completion/.post -- hidden from eselect + dodir /usr/share/bash-completion + awk -v D="$D" ' + BEGIN { out=".pre" } + /^# A lot of the following one-liners/ { 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" + + exeinto /etc/profile.d + doexe ${FILESDIR}/bash-completion.sh || die "failed to install profile.d" + + # dev-util/subversion provides an extremely superior completion + rm contrib/subversion + insinto /usr/share/bash-completion + doins contrib/* || die "failed to install contrib completions" + + dodoc Changelog README +} + +pkg_preinst() { + # This file is now being installed as bash-completion.sh, so rename it + # first. That allows CONFIG_PROTECT to kick in properly + if [[ -f ${ROOT}/etc/profile.d/bash-completion && \ + ! -f ${ROOT}/etc/profile.d/bash-completion.sh ]] + then + mv ${ROOT}/etc/profile.d/bash-completion{,.sh} + fi +} + +pkg_postinst() { + einfo + einfo "Versions of bash-completion prior to 20060301-r1 required each user to" + einfo "explicitly source /etc/profile.d/bash-completion in ~/.bashrc. This" + einfo "was kludgy and inconsistent with the completion modules which are" + einfo "enabled with eselect bashcomp. Now any user can enable the base" + einfo "completions without editing their .bashrc by running" + einfo + einfo " eselect bashcomp enable base" + einfo + einfo "The system administrator can also be enable this globally with" + einfo + einfo " eselect bashcomp enable --global base" + einfo + einfo "Additional completion functions can also be enabled or" + einfo "disabled using eselect's bashcomp module." + einfo + + if has_version 'app-shells/zsh' ; then + einfo "If you are interested in using the provided bash completion functions with" + einfo "zsh, valuable tips on the effective use of bashcompinit are available:" + einfo " http://www.zsh.org/mla/workers/2003/msg00046.html" + einfo " http://zshwiki.org/ZshSwitchingTo" + einfo + fi +} diff --git a/app-shells/bash-completion/files/bash-completion.sh b/app-shells/bash-completion/files/bash-completion.sh index 36a194508a4e..fb99daee0b98 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-2004 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.1 2006/11/20 23:06:15 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.2 2006/11/22 14:54:21 agriffis Exp $ # # START bash completion -- do not remove this line @@ -12,30 +12,36 @@ then declare f x loaded_pre=false for f; do if [[ -f $f ]]; then - # Some modules, including default, depend on the definitions + # Prevent loading base twice, initially and via glob + 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_pre; then BASH_COMPLETION=/usr/share/bash-completion/base source /usr/share/bash-completion/.pre loaded_pre=true fi + source "$f" fi done # Clean up $loaded_pre && source /usr/share/bash-completion/.post - unset -f _load_completions + unset -f _load_completions # not designed to be called more than once } - # 1. Load defaults, if eselected. This was previously known as + # 1. Load base, if eselected. This was previously known as # /etc/bash_completion # 2. Load completion modules, maintained via eselect bashcomp --global # 3. Load user completion modules, maintained via eselect bashcomp # 4. Load user completion file last, overrides modules at user discretion _load_completions \ - /etc/bash_completion.d/default \ - ~/.bash_completion.d/default \ + /etc/bash_completion.d/base \ + ~/.bash_completion.d/base \ /etc/bash_completion.d/* \ ~/.bash_completion.d/* \ ~/.bash_completion diff --git a/app-shells/bash-completion/files/digest-bash-completion-20060301-r2 b/app-shells/bash-completion/files/digest-bash-completion-20060301-r2 new file mode 100644 index 000000000000..845b62873eb5 --- /dev/null +++ b/app-shells/bash-completion/files/digest-bash-completion-20060301-r2 @@ -0,0 +1,3 @@ +MD5 ed95a89f57357a42b8e4eb95487bf9d0 bash-completion-20060301.tar.bz2 102357 +RMD160 eaa9112289607bae51868f047a9673ee6f3e6a0c bash-completion-20060301.tar.bz2 102357 +SHA256 16727406bd3fbb6a23da375d4f3ca7c5d518afeb7dfb82c061a452eb7a93ceca bash-completion-20060301.tar.bz2 102357 |