Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472438 - app-emulation/xen-tools: bash completion in wrong place and with wrong name
Summary: app-emulation/xen-tools: bash completion in wrong place and with wrong name
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: bashcomp2
  Show dependency tree
 
Reported: 2013-06-05 20:18 UTC by Jason A. Donenfeld
Modified: 2014-11-01 14:56 UTC (History)
3 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 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2013-06-05 20:18:30 UTC
The ebuild puts xl.sh into /etc/bash_completion.d, which doesn't allow for eselect bashcomp nobs. Instead install this to the right place by using the eclass and newbashcomp so it goes into /usr/share/bash-completion.

Reproducible: Always
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2013-06-28 13:50:31 UTC
(In reply to Jason A. Donenfeld from comment #0)
> The ebuild puts xl.sh into /etc/bash_completion.d, which doesn't allow for
> eselect bashcomp nobs. Instead install this to the right place by using the
> eclass and newbashcomp so it goes into /usr/share/bash-completion.
> 
If it were only so easy, but no.  
1. We're competing with python-r`1 here.
2. The file xl.sh starts life in the source under a totally different and generic name.  Subsequently new bash-completion-r1 is clean bowled not once but twice.
Why? Well, at installation, python-r1 installs via ${T}/${EPYTHON}, offsetting and upsetting attempts to set args to newbashcomp.

The sed to Config.mk joins in and doesn't even install it to where it's reset.  Being a 1 man band, there's no-one to pass this onto for a second attempt.
This time revbumped.

*xen-tools-4.2.2-r3 (28 Jun 2013)
*xen-tools-4.2.1-r5 (28 Jun 2013)

  28 Jun 2013; Ian Delaney <idella4@gentoo.org> +xen-tools-4.2.1-r5.ebuild,
  +xen-tools-4.2.2-r3.ebuild, xen-tools-4.2.1-r3.ebuild,
  xen-tools-4.2.1-r4.ebuild, xen-tools-4.2.2-r1.ebuild,
  xen-tools-4.2.2-r2.ebuild:
  rm stray line, revbumps; set correct install location wrt Bug #472438
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 15:25:37 UTC
 * Bash completions were installed in legacy location. Please update
 * the ebuild to get the install paths using bash-completion-r1.eclass.
 * 
 * Problems with installed bash completions were found:
 * 
 * 	xl.sh: incorrect name, no completions for 'xl.sh' command defined.
 * 	xl: missing alias (symlink) for completed command.
 * 
 * For more details on installing bash-completions, please see:
 * https://wiki.gentoo.org/wiki/Bash/Installing_completion_files

Not only the location is wrong but also the filename should be 'xl' rather than 'xl.sh'.

Looks like the current ebuild is a collection of random broken hacks:

l145:
    #bug 472438
    export BASH_COMPLETION_DIR=/usr/share/bash-completion

l222:
    # Bug 472438
    sed -e 's:^BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(SHARE_DIR)/bash-completion:' \
        -i Config.mk || die

l318:
    # Reset bash completion dir; Bug 472438
    mv "${D}"bash-completion "${D}"usr/share/ || die

Not sure which of them actually do something... but neither of them uses get_bashcompdir as it should.
Comment 3 Yixun Lan gentoo-dev 2014-11-01 14:56:04 UTC
thanks, fixed in tree, xen-tools-4.4.1-r2, 4.3.3-r1, 4.2.5-r1