Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263105 - app-shells/bash-completion-{1.0-r5,1.1} improper env var handling in Gentoo (causes scp completion and whitespace completion issues)
Summary: app-shells/bash-completion-{1.0-r5,1.1} improper env var handling in Gentoo (...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
: 289801 (view as bug list)
Depends on:
Blocks: 265504
  Show dependency tree
 
Reported: 2009-03-20 09:24 UTC by Tobias Klausmann (RETIRED)
Modified: 2009-10-21 13:06 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klausmann (RETIRED) gentoo-dev 2009-03-20 09:24:06 UTC
I've activated the ssh complete-let using eselect. Hostname completion works for both ssh and scp. But paths for scp are not expanded remotely but locally:

[klausman@karotte ~]$ ssh ganesha.syn ls /usr/portage/packages/sys-devel/
binutils-2.19.1-r1.tbz2
gcc-4.2.4-r1.tbz2
gcc-4.2.4.tbz2
gcc-4.3.2-r2.tbz2
gcc-4.3.3-r1.tbz2
gcc-4.3.3.tbz2
[klausman@karotte ~]$ scp binutils-2.19.1-r1.tbz2 ganesha.syn:/usr/portage/packages/sys-devel/<tab><tab>
/usr/portage/packages/sys-devel/automake-1.10.1.tbz2 
/usr/portage/packages/sys-devel/automake-1.4_p6.tbz2 
/usr/portage/packages/sys-devel/automake-1.5.tbz2 
/usr/portage/packages/sys-devel/automake-1.6.3.tbz2 
/usr/portage/packages/sys-devel/automake-1.7.9-r1.tbz2 
/usr/portage/packages/sys-devel/automake-1.8.5-r3.tbz2 
/usr/portage/packages/sys-devel/automake-1.9.6-r2.tbz2 
/usr/portage/packages/sys-devel/bin86-0.16.17.tbz2 
/usr/portage/packages/sys-devel/gcc-3.4.6-r2.tbz2 
/usr/portage/packages/sys-devel/gcc-4.2.3.tbz2 

[klausman@karotte ~]$ ls /usr/portage/packages/sys-devel/
automake-1.10.1.tbz2  automake-1.7.9-r1.tbz2  gcc-3.4.6-r2.tbz2
automake-1.4_p6.tbz2  automake-1.8.5-r3.tbz2  gcc-4.2.3.tbz2
automake-1.5.tbz2     automake-1.9.6-r2.tbz2
automake-1.6.3.tbz2   bin86-0.16.17.tbz2
Comment 1 Tobias Klausmann (RETIRED) gentoo-dev 2009-03-20 09:25:51 UTC
This might be a dupe of bug 262246
Comment 2 ferret 2009-03-20 09:38:35 UTC
Seems to be related to COMP_WORDBREAKS containing ':'.  I played around with it for a while but couldn't come up with a satisfactory solution.

You can't just change COMP_WORDBREAKS, since that would effect everything else.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-09 04:54:41 UTC
fixed in v1.0? You will have to "downgrade" to 1.0
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-10 01:43:30 UTC
Sorry to bother you again with another bug spam. I think I fixed this in 1.0-r1 because it seems closely related to bug 262246. Please re-open if I am incorrect. thx
Comment 5 Tobias Klausmann (RETIRED) gentoo-dev 2009-07-27 12:17:41 UTC
Sorry for taking an age to actually test this, but I did so today. It's still broken in the same way with app-shells/bash-4.0_p28 and app-shells/bash-completion-1.0-r5

Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-28 00:33:35 UTC
For the record (it has been discussed in IRC ages ago), not much is going to happen here until upstream releases a new version. Too many upstream commits to make my way through it..
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-06 05:12:53 UTC
As an update, it looks like upstream is preparing a new release based on IRC convo with the lead dev.
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-16 02:01:20 UTC
Not fixed in upstream release 1.1

Upstream report: https://alioth.debian.org/tracker/index.php?func=detail&aid=311702&group_id=100114&atid=413095
RH Report: https://bugzilla.redhat.com/show_bug.cgi?id=502745
Comment 9 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-19 20:49:19 UTC
*** Bug 289801 has been marked as a duplicate of this bug. ***
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-19 20:52:43 UTC
Gentoo specific problem. We split up the bash-completion file into .pre, base, and .post. This causes me many problems including this one. $bash4 is not being exported to the base module. Arg.

Temp fix:
%% export bash4=$BASH_VERSION

Long term fix:
-patch .pre to export the var
-merge .pre/base/.post again
-upstream fix

Consulting with upstream now, will get this fixed as soon as I can.
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-21 13:06:44 UTC
Fixed in 1.1-r3.

%% diff -u bash-completi1.1-r2.ebuild bash-completion-1.1-r3.ebuild 
--- bash-completion-1.1-r2.ebuild       2009-10-20 08:03:03.000000000 -0500
+++ bash-completion-1.1-r3.ebuild       2009-10-20 20:19:03.000000000 -0500
@@ -23,6 +23,8 @@
 src_prepare() {
        cp "${FILESDIR}/bash-completion.sh" "${T}" || die
        eprefixify "${T}/bash-completion.sh"
+       # On the roadmap to change in next release, "2.0"
+       sed -i -e 's/declare -r bash4/export bash4/' bash_completion || die
 }
 
 src_install() {