Description of problem: urpme tab completion doesn't work. Steps to Reproduce: 1. Type (as root): "urpme apac[TAB_KEY]" 2. Expect urpme to tab-complete on packages matching apache-* 3. Actually, I get: urpme apacbash: _rpm_installed_packages: command not found. The function _rpm_installed_packages is called from the file /etc/bash_completion.d/urpmi. Aside: the rpmdevtools package contains the similarly named _rpmdev_installed_packages() in the file: /etc/bash_completion.d/rpmdevtools.bash-completion
Assignee: bugsquad => guillomovitchSource RPM: urpmi-6.46-1.mga2 => urpmi
Try uninstalling packagekit-command-not-found
CC: (none) => davidwhodgins
(In reply to comment #1) > Try uninstalling packagekit-command-not-found I didn't have that installed anyway. Installing it makes no difference. The problem is that the function _rpm_installed_packages() is never defined in /etc/bash_completion.d/* This function is called in several places, but not defined. It looks as though there should be a file: /etc/bash_completion.d/rpm but this does not exist, nor does urpmf locate one.
This function is defined in /usr/share/bash-completion/completions/rpm, which is dynamically loaded the first time rpm completion is attempted. Just try 'rpm -<TAB>', then 'urpme <TAB>'. We need to force rpm completion loading from another completion here.
Status: NEW => ASSIGNED
That's rather clever (and yes, it does work). I'm curious: why are some completions in /usr/share/bash-completion/completions/ while others are in /etc/bash_completion.d . This would probably suggest moving urpmi's completion function while we are at it.
upstream project bash-completion now install all its completion files under /usr/share, and ensure they are automatically loaded when needed. Individual projects still install under /etc/bash_completion.d, where they are automatically sourced each time a new shell is created. I'm not sure just changing files location is enough, I think some adaptation is also needed.
I just commited a fix in svn, I'm waiting for urpmi maintainer input before issuing a new release.
Fix released in urpmi 6.48.
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED