Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 477386

Summary: app-office/libreoffice-bin does not respect bashcompdir
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Andreas K. Hüttel <dilfridge>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, office
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 477380    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-19 11:30:13 UTC
Dunno about the source version but -bin installs those to /usr/share/bash-completion rather than using $(get_bashcompdir). This fails with bash-completion-2.1-r1.
Comment 1 Alexander Tsoy 2013-07-19 14:15:24 UTC
AFAIK, distfiles for libreoffice-bin are built on a stable system using libreoffice ebuild. Build system install completion into compatdir, then libreoffice ebuild do this:

        # Fix bash completion placement
        newbashcomp "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
        rm -rf "${ED}"/etc/

Even if completion will be installed in completionsdir ( $(get_bashcompdir) ), bash initially will not autocomplete commands other than "libreoffice". Two solutions:
1. Leave completion in compatdir (and do not use dynamic loading) :(
2. Move completion into completionsdir and create symlinks for all commands that it can autocomplete:

user@host $ sed -ne '/^complete.*\\$/,/[^\\]$/p' /usr/share/bash-completion/libreoffice 
complete -d -X '.[^./]*' -F _loexp_ ${_file} \
					lobase \
					lofromtemplate \
					lodraw \
					localc \
					lomath \
					loweb \
					libreoffice \
					lowriter \
					loimpress \
					unopkg \
					loffice
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2013-12-27 19:42:34 UTC
As far as I can see this should be fixed.