Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289240 - app-shells/bash-completion-1.1: Syntax errors in bash-builtins
Summary: app-shells/bash-completion-1.1: Syntax errors in bash-builtins
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-15 20:22 UTC by Mike Auty (RETIRED)
Modified: 2009-10-17 01:45 UTC (History)
7 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 Mike Auty (RETIRED) gentoo-dev 2009-10-15 20:22:17 UTC
Hiya

Just a quick note to say initially that bash-completion-1.1 doesn't install it's files as executable under /usr/share/bash-completion/.  That causes the following message:

-bash: /etc/bash_completion.d/bash-builtins: Permission denied

After chowning everything +x, I then get the following:

/etc/bash_completion.d/bash-builtins: line 58: syntax error in conditional expression: unexpected token `('
/etc/bash_completion.d/bash-builtins: line 58: syntax error near `@(d'
/etc/bash_completion.d/bash-builtins: line 58: `    if [[ $1 == @(declare|typeset) ]]; then'

You're welcome to my "emerge --info" if it helps (just ask), but my guess is this is potentially a bash-4.0 issue?
Comment 1 Ivan c00kiemon5ter Kanakarakis 2009-10-15 20:49:44 UTC
I get the same behavior

bash: /etc/bash_completion.d/apache2ctl: Permission denied
bash: /etc/bash_completion.d/ant: Permission denied
Comment 2 Nikos Chantziaras 2009-10-15 22:42:14 UTC
It's also broken here in the same way.
Comment 3 Nikos Chantziaras 2009-10-15 22:51:34 UTC
Also, the ebuild doesn't delete the "base" module, resulting in an "/etc/bash_comletion.d/base: not found" error; /etc/bash_comletion.d/base is left as a broken symlink.  This means the upgrade path is not clean (which will be important to get the update stabled.)  If the ebuild can't delete that file automatically, it should tell the user about it and urge him to run:

  (as root) rm -f /etc/bash_comletion.d/base
  (as user) rm -f ~/.bash_completion.d/base
Comment 4 Ivan c00kiemon5ter Kanakarakis 2009-10-15 23:31:52 UTC
Actually there are still references to 'base' and '/etc/bash_completion.d/*'

/etc/profile.d/bash-completion.sh:    /etc/bash_completion.d/* 
/etc/config-archive/etc/profile.d/bash-completion.sh.1:	/etc/bash_completion.d/base \
/etc/config-archive/etc/profile.d/bash-completion.sh.1:	/etc/bash_completion.d/* \
/etc/config-archive/etc/profile.d/bash-completion.sh:    /etc/bash_completion.d/base \
/etc/config-archive/etc/profile.d/bash-completion.sh:    /etc/bash_completion.d/* \
/etc/config-archive/etc/profile.d/bash-completion.sh.dist:    /etc/bash_completion.d/* \

These cause this problem :
bash: /etc/bash_completion.d/*: No such file or directory
when all bash-completion is disabled
$ eselect bashcomp disable $(seq 1 xxx) 

yes, there are broken symlinks in /etc/bash_completion.d/ and ~/.bash_completion.d/
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-16 01:45:53 UTC
I had a lengthy reply drafted up, but the long story short is that I messed this up.

+*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

The 'base' module is back. I wanted to move away from this because it is a burden to maintain but maybe some other time with much, much more testing. Please file *new* bugs if you find anything. (BTW, the bash-builtins module use to be in base but is now split out per upstream decision)
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-16 21:51:35 UTC
For the record, I never saw my mistake. I forgot the "\" to continue on the newline! Doh.

Line 42: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh?r1=1.4&r2=1.5

Sorry again for the trouble.
Comment 7 Ivan c00kiemon5ter Kanakarakis 2009-10-17 01:45:58 UTC
(In reply to comment #6)
> For the record, I never saw my mistake. I forgot the "\" to continue on the
> newline! Doh.
> 
> Line 42:
> http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh?r1=1.4&r2=1.5
> 
> Sorry again for the trouble.
> 

nah, don't be sorry, it's ok to try to make things simpler, 
we're on testing so one should expect those things ;-)