FS#31216 - [schroot] Broken bash completion in schroot

Attached to Project: Community Packages
Opened by Peter Wu (Lekensteyn) - Monday, 20 August 2012, 21:16 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 12 March 2015, 18:47 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When pressing "Tab" after having typed "schroot ", I get the following error:

bash: completion: function `_schroot' not found

After some digging, I found out that _schroot is not defined because the
deprecated "have" function is not defined either (it got unset on the bottom
of /usr/share/bash-completion/bash_completion).

"have" only works for files installed in /etc/bash_completion.d/. The Debian
rules file installs it to there, but Arch installs it to
/usr/share/bash_completion.d/completions/.

The attached fix-bash-completion.patch solves this bug by using the "_have"
function instead of the deprecated "have" function.

The attached PKGBUILD.diff contains changes to the current community/schroot
package to use the latest 1.6.3 source package (makepkg -o failed because the
source is unavailable, I had to update this) and apply the bash completion
patch.

Package: schroot 1.6.0-1
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 12 March 2015, 18:47 GMT
Reason for closing:  Fixed
Comment by Bartłomiej Piotrowski (Barthalion) - Tuesday, 21 August 2012, 18:36 GMT
Thanks for patches!
Comment by Mikhail Shiryaev (Felixoid) - Monday, 02 March 2015, 15:46 GMT
  • Field changed: Percent Complete (100% → 0%)
$ pacman -Q schroot
schroot 1.6.10-4
$ ls /etc/bash_completion.d/
eine novaclient yandex-disk-completion.bash
$ ls /usr/share/bash-completion/bash_completion -l
-rw-r--r-- 1 root root 68065 апр 23 2014 /usr/share/bash-completion/bash_completion
$ schroot -c bash: completion: function `_schroot' not found
$ schroot -c

Problem doesn't solved
Comment by Peter Wu (Lekensteyn) - Monday, 02 March 2015, 19:39 GMT
Confirmed, this is broken since 1.6.10-1 [1]. I can confirm that adding the underscore makes completion work again.

[1]: https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/schroot&id=7e8df94733520cf9db9082f1ff6decc7458632d5

Loading...