Bug 2629 - urpmi bash completion is very slow
: urpmi bash completion is very slow
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: Denis Silakov
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-01 22:37 MSD by Rolf Pedersen
Modified: 2013-09-19 13:51 MSD (History)
3 users (show)

See Also:
RPM Package: urpmi-6.71-33-rosa2012.1.noarch
ISO-related:
Bad POT generating:
Upstream:
vladimir.potapov: qa_verified+
alex.burmashev: published+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Pedersen 2013-09-01 22:37:23 MSD
$ cat /etc/rosa-release 
ROSA Desktop Fresh R1 release 2012.1 for x86_64
$ rpm -q urpmi
urpmi-6.71-33-rosa2012.1.noarch

Typing, for example,

# urpmi wg[TAB]

results in a very long wait to return three possible package candidates.

wget            wget-debuginfo  wgetpaste

There is a Mageia bug that describes this symptom and, possibly, a workaround:
https://bugs.mageia.org/show_bug.cgi?id=373

Following that report, I have modified the line of "_urpmi_packages()" in /etc/bash_completion.d/urpmi from:

COMPREPLY=( $( compgen -W "$(urpmq $options --list)" -- $cur ) )

to:

COMPREPLY=( $( compgen -W "$(urpmq $options --list | grep ^$cur )" -- ) )

as recommended by Neill in comment 8: 
https://bugs.mageia.org/show_bug.cgi?id=373#c8

With that change,

# urpmi ba[TAB]

returns 72 candidates in less than a second.  This might be worth looking into.  Thanks.
Comment 1 Denis Silakov 2013-09-18 13:42:11 MSD
Indeed, this is a very good patch, thanks for pointing this out.

Advisory:
Significantly increase speed of autocompletion for urpmi.

Build lists:
https://abf.rosalinux.ru/build_lists/1260194
https://abf.rosalinux.ru/build_lists/1260195
Comment 2 Vladimir Potapov 2013-09-18 16:14:11 MSD
urpmi-6.71-34-rosa2012.1
*************************** Advisory *************************
Significantly increase speed of autocompletion for urpmi.
**************************************************************
QA Verified