summaryrefslogtreecommitdiff
path: root/community/schroot
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-12-25 02:32:08 -0800
committerroot <root@rshg054.dnsready.net>2012-12-25 02:32:08 -0800
commit6fbdd2899f39266e458531dcffefb85b9ce8d1b9 (patch)
tree7d290e717ddd4dab90362a017be197c551dd2ae0 /community/schroot
parent6003fa8908f984a4696fade78b69a8803eabcc6c (diff)
Tue Dec 25 02:27:55 PST 2012
Diffstat (limited to 'community/schroot')
-rw-r--r--community/schroot/PKGBUILD11
-rw-r--r--community/schroot/colon-completion.patch38
2 files changed, 45 insertions, 4 deletions
diff --git a/community/schroot/PKGBUILD b/community/schroot/PKGBUILD
index 3e850460d..f9b2fdeb3 100644
--- a/community/schroot/PKGBUILD
+++ b/community/schroot/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 80475 2012-11-22 15:02:06Z spupykin $
+# $Id: PKGBUILD 81583 2012-12-24 15:02:13Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Wagner <Andreas dot Wagner at em dot uni-frankfurt dot de>
pkgname=schroot
pkgver=1.6.3
-pkgrel=3
+pkgrel=4
pkgdesc="Allows users to execute shell commands under different root filesystems. (Successor to dchroot)."
url="http://packages.qa.debian.org/s/schroot.html"
license=('GPL3')
@@ -21,25 +21,28 @@ backup=('etc/schroot/schroot.conf'
'etc/schroot/arch32/nssdatabases')
options=(!libtool)
source=("http://ftp.debian.org/debian/pool/main/s/$pkgname/${pkgname}_${pkgver}.orig.tar.xz"
- 'pam.d.schroot.patch'
'arch32-example'
'arch32-config'
'arch32-copyfiles'
'arch32-mount'
'arch32-nssdatabases'
+ 'pam.d.schroot.patch'
+ 'colon-completion.patch'
'fix-bash-completion.patch')
md5sums=('f6b1badef213ce8e9ef37bb3fc213390'
- 'a8d77cac806a0a9adef3f93cdbeb280a'
'54239847f89b9a4772910415bde6276a'
'5a3f7b839c7e0b8933748da7c5b6385b'
'ddb2f09c02b24dab777110f9808472e1'
'f0d5d5b5e34a860f6f90b5628c680f46'
'af1da6edd8c8c0dafeeb2c2c4e0c840b'
+ 'a8d77cac806a0a9adef3f93cdbeb280a'
+ '8502fcc9112c2971bcae35373d2ff42f'
'5ba775d4f401e2c167414caa548b71e5')
build() {
cd ${pkgname}-${pkgver}
patch -p1 -i ${srcdir}/fix-bash-completion.patch
+ patch -p1 -i ${srcdir}/colon-completion.patch
export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
./configure \
--prefix=/usr \
diff --git a/community/schroot/colon-completion.patch b/community/schroot/colon-completion.patch
new file mode 100644
index 000000000..5cd8f8996
--- /dev/null
+++ b/community/schroot/colon-completion.patch
@@ -0,0 +1,38 @@
+From 1563e1ba9bc2b317390ef305ae9af56a4b976940 Mon Sep 17 00:00:00 2001
+From: Peter Wu <lekensteyn@gmail.com>
+Date: Sat, 22 Dec 2012 16:37:00 +0100
+Subject: [PATCH] etc: make bash completion work for colon values
+
+--chroot (and -c) accept values like chroot:foo and session:foo-abc. Standard
+bash completion treats colons as whitespace, hence we need a way to force that
+off.
+
+Fix based on http://stackoverflow.com/q/10528695/427545 (thanks Radu Gasler!)
+---
+ etc/bash_completion/schroot | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/etc/bash_completion/schroot b/etc/bash_completion/schroot
+index 035f0b3..7cda29b 100644
+--- a/etc/bash_completion/schroot
++++ b/etc/bash_completion/schroot
+@@ -21,14 +21,14 @@ _schroot()
+ local cur prev options
+
+ COMPREPLY=()
+- cur=${COMP_WORDS[COMP_CWORD]}
+- prev=${COMP_WORDS[COMP_CWORD-1]}
++ _get_comp_words_by_ref -n : cur prev
+
+ # Select precisely the tokens from schroot --help that begin with a dash
+ options=$(schroot --help | sed 's/\(^\|[[:space:]]\)[^[:space:]-][^[:space:]]*//g')
+
+ if [ "$prev" = "-c" ] || [ "$prev" = "--chroot" ]; then
+ COMPREPLY=( $(compgen -W "$(schroot -a -l)" -- $cur) )
++ __ltrim_colon_completions "$cur"
+ else
+ COMPREPLY=( $(compgen -W "$options" -- $cur) )
+ fi
+--
+1.8.0.2
+