monotone

Issue 180: monotone-1.0: bash_completion test FAIL

Reported by Peter Volkov, Sep 5, 2011

Gentoo uses different place for bash_completion test. Please, attach 
patch in attachment, so monotone test suite was able to find it. But 
even with this patch tests fail (please, see extra.log).

Comment 1 by Thomas Keller, Sep 6, 2011

Hrm... apparently Gentoo uses a different version of 
bash_completion. Peter, could you please attach the Gentoo version 
here?

@Richard: Could you have a look what is missing there...? Thanks!
Owner: levitte

Comment 2 by Richard Levitte, Sep 6, 2011

Yup, I'll have a look

Comment 3 by Richard Levitte, Sep 6, 2011

Hmmm, the extra log suggests Gentoo has a different bash-completion 
version than I've played with.  The function _split_longopt isn't 
there, which breaks the monotone completion script...

I'll see what I can do about that...

Peter, what Gentoo version are we talking about?  And 
bash-completion version?

Comment 4 by Peter Volkov, Sep 7, 2011

We are using bash-completion for this site:
http://bash-completion.alioth.debian.org/

That said I've tracked what causes this test failure. In Gentoo 
bash-completion package just installs 
/etc/profile.d/bash-completion.sh script, which you can see here:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-shells/ba
sh-completion/files/bash-completion.sh-gentoo-1.2?revision=1.1&vi
ew=markup
and files into /usr/share/bash-completion/.

By default this script does nothing (see script: _load_completions 
loads .pre and base only in case at least one script is in 
"/etc/bash_completion.d/"*    ~/.bash_completion.d/* or 
~/.bash_completion .) So user must enable at least some bash 
completion to make it load basic definitions from 
/usr/share/bash-completion/.pre (where  _get_comp_words_by_ref is 
defined) and enable base (for _longopt). Also this all works only 
for interactive bash, like it should.

So now I propose the patch in attachment that loads all required 
bash-completion functions from /usr/share/bash-completion/.pre  and 
/usr/share/bash-completion/base and with this patch tests succeed. 
Please, apply.

Comment 5 by Richard Levitte, Sep 10, 2011

Ok, patch applied.  Thanks!
Revision 3d073d7ef08bfbe9f93dc2b6131486cc6e2f6aec
Status: Fixed

Created: 12 years 7 months ago by Peter Volkov

Updated: 12 years 7 months ago

Status: Fixed

Owner: Richard Levitte

Followed by: 1 person

Labels:
Type:Defect
Priority:Medium

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status