aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-06-13 17:41:00 +0200
committerUlrich Müller <ulm@gentoo.org>2013-07-16 09:45:30 +0200
commit2ea27fd3794db4758c2f76117f34d6205652ce2b (patch)
treef13cba0691a607a00ea340149858b220ee95d630
parentkernel.eselect: Check for Makefile in target tree, bug 460328. (diff)
downloadeselect-2ea27fd3794db4758c2f76117f34d6205652ce2b.tar.gz
eselect-2ea27fd3794db4758c2f76117f34d6205652ce2b.tar.bz2
eselect-2ea27fd3794db4758c2f76117f34d6205652ce2b.zip
Remove bashcomp module, bug 476992.
* modules/bashcomp.eselect: Remove. * modules/Makefile.am (modules_DATA): Remove bashcomp.eselect. * Makefile.am (symlinks): Don't install bashcomp-config symlink.
-rw-r--r--AUTHORS2
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.am2
-rw-r--r--modules/Makefile.am1
-rw-r--r--modules/bashcomp.eselect207
5 files changed, 8 insertions, 210 deletions
diff --git a/AUTHORS b/AUTHORS
index 4bb8e85..5246168 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -9,7 +9,7 @@ Danny van Dyk <kugelfang@gentoo.org>
Libraries: config, multilib
Aaron Walker <ka0ttic@gentoo.org>
- Modules: bashcomp, profile
+ Modules: profile
Donnie Berkholz <dberkholz@gentoo.org>
Libraries: skel
diff --git a/ChangeLog b/ChangeLog
index 827532d..67605fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-16 Ulrich Müller <ulm@gentoo.org>
+
+ * modules/bashcomp.eselect: Remove, bug 476992.
+ * modules/Makefile.am (modules_DATA): Remove bashcomp.eselect.
+ * Makefile.am (symlinks): Don't install bashcomp-config symlink.
+
2013-07-14 Ulrich Müller <ulm@gentoo.org>
* modules/kernel.eselect (find_targets, set_symlink, do_show):
diff --git a/Makefile.am b/Makefile.am
index e7a0972..ead15e5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = dist-xz no-dist-gzip
doc_files = README TODO
-export symlinks := kernel-config profile-config rc-config bashcomp-config
+export symlinks := kernel-config profile-config rc-config
SUBDIRS = doc man misc bin libs modules
MAINTAINERCLEANFILES = \
diff --git a/modules/Makefile.am b/modules/Makefile.am
index db6857b..73960c4 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -1,7 +1,6 @@
modulesdir=$(datadir)/$(PACKAGE_NAME)/modules/
modules_DATA = \
- bashcomp.eselect \
binutils.eselect \
editor.eselect \
env.eselect \
diff --git a/modules/bashcomp.eselect b/modules/bashcomp.eselect
deleted file mode 100644
index d837b67..0000000
--- a/modules/bashcomp.eselect
+++ /dev/null
@@ -1,207 +0,0 @@
-# -*-eselect-*- vim: ft=eselect
-# Copyright 2005-2013 Gentoo Foundation
-# Distributed under the terms of the GNU GPL version 2 or later
-
-DESCRIPTION="Manage contributed bash-completion scripts"
-MAINTAINER="eselect@gentoo.org"
-
-find_targets() {
- local bcdir bc
-
- for bcdir in "${EROOT%/}/usr/share/bash-completion" ${ES_BASHCOMP_DIRS}
- do
- for bc in "${bcdir}"/*; do
- [[ -f ${bc} && ${bc} != *~ ]] && basename "${bc}"
- done
- done | sort -u
-}
-
-is_enabled() {
- local bcdir
-
- bcdir=${ROOT%/}/${HOME}/.bash_completion.d
- if [[ $1 == "--global" ]]; then
- bcdir=${EROOT%/}/etc/bash_completion.d
- shift
- fi
-
- [[ -e ${bcdir}/$1 ]]
-}
-
-### list action ###
-
-describe_list() {
- echo "List available completions"
-}
-
-describe_list_options() {
- echo "--global : List globally enabled completions"
-}
-
-do_list() {
- local targets opts i
- targets=( $(find_targets) )
-
- if [[ $1 == "--global" ]]; then
- opts="--global"
- shift
- fi
-
- for (( i = 0; i < ${#targets[@]}; i++ )); do
- is_enabled ${opts} "${targets[i]}" \
- && targets[i]=$(highlight_marker "${targets[i]}")
- done
-
- write_list_start "Available completions:"
- write_numbered_list -m "(none found)" "${targets[@]}"
-}
-
-### enable action ###
-
-describe_enable() {
- echo "Enable specified completion(s)"
-}
-
-describe_enable_parameters() {
- echo "<target>"
-}
-
-describe_enable_options() {
- echo "--global : Enable for all users"
- echo "<target> : Target name or number (from 'list' action)"
-}
-
-do_enable() {
- local bcdir bc mode="" file target targets
-
- bcdir=${ROOT%/}/${HOME}/.bash_completion.d
- if [[ $1 == "--global" ]]; then
- bcdir=${EROOT%/}/etc/bash_completion.d
- mode="-m 0755"
- shift
- fi
-
- [[ $# -eq 0 ]] && die -q "You didn't specify any completions to enable."
-
- # create directory if necessary
- if [[ ! -d ${bcdir} && -w $(dirname ${bcdir}) ]]; then
- mkdir ${mode} "${bcdir}" || die -q "Failed to create ${bcdir}"
- elif [[ ! -d ${bcdir} ]]; then
- die -q "You don't have permission to create ${bcdir}"
- fi
-
- # make sure we have proper permissions
- [[ -w ${bcdir} ]] \
- || die -q "You don't have permission to write to ${bcdir}"
-
- targets=( $(find_targets) )
-
- for bc in "$@"; do
- # ignore any unrecognized options
- [[ ${bc} == --* ]] && continue
-
- target=${bc}
- is_number "${target}" && target=${targets[target-1]}
-
- [[ -z ${target} ]] \
- && die -q "Target \"${bc}\" doesn't appear to be valid!"
-
- bc=${target}
-
- # what form is the argument in?
- case "${bc}" in
- # absolute path
- /*)
- file=${ROOT%/}/${bc}
- ;;
- # relative path
- */*)
- file=${ROOT%/}/${PWD}/${bc}
- ;;
- # no path
- *)
- # assume /usr/share/bash-completion
- file=${EROOT%/}/usr/share/bash-completion/${bc}
- if [[ ! -f ${file} ]]; then
- for x in ${ES_BASHCOMP_DIRS}; do
- [[ -f ${x}/${bc} ]] && file=${x}/${bc}
- done
- fi
- ;;
- esac
-
- # does it exist?
- if [[ ! -f ${file} ]]; then
- write_error_msg "${file} doesn't exist"
- continue
- fi
-
- # already installed?
- if [[ -e ${bcdir}/$(basename ${bc}) ]]; then
- write_error_msg "$(basename ${bc}) is already installed"
- continue
- fi
-
- # finally, create the symlink
- ln -s "$(relative_name "${file}" "${bcdir}")" "${bcdir}/" \
- || die -q "Failed to create symlink from ${file} to ${bcdir}"
- done
-}
-
-### disable action ###
-
-describe_disable() {
- echo "Disable specified completion(s)"
-}
-
-describe_disable_parameters() {
- echo "<target>"
-}
-
-describe_disable_options() {
- echo "--global : Disable for all users"
- echo "<target> : Target name or number (from 'list' action)"
-}
-
-
-do_disable() {
- local bcdir bc targets target file
-
- bcdir=${ROOT%/}/${HOME}/.bash_completion.d
- if [[ $1 == "--global" ]]; then
- bcdir=${EROOT%/}/etc/bash_completion.d
- shift
- fi
-
- [[ $# -eq 0 ]] && die -q "You didn't specify any completions to disable"
-
- targets=( $(find_targets) )
-
- for bc in "$@"; do
- # ignore any unrecognized options
- [[ ${bc} == --* ]] && continue
-
- target=${bc}
-
- is_number "${target}" && target=${targets[target-1]}
-
- [[ -z ${target} ]] \
- && die -q "Target \"${bc}\" doesn't appear to be valid!"
-
- bc=${target}
- file=${bcdir}/${bc}
-
- # is it installed?
- if [[ ! -e ${file} ]]; then
- write_error_msg "${bc} is not installed"
- continue
- fi
-
- # remove it if we have permissions
- if [[ -w $(dirname ${file}) ]]; then
- rm "${file}" || die -q "Failed to remove ${file}"
- else
- die -q "You don't have permission to remove ${file}"
- fi
- done
-}