Description of problem: dnf is taking too much time (many seconds) to autocomplete packages names with <tab>. Version: 4.2.19 Steps to Reproduce: Type: sudo dnf install <any letter> them <tab> or <tab><tab> Actual results: Taking many seconds to show completion options. Expected results: Display options almost instantly. Additional info: none
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Just wanted to add that this still exists in Fedora 33. The autocomplete from the command line still takes a long time (10s or more) if any package lists are required (install, localinstall, remove, grouplist, etc.). Even localinstall which should just check the local path seems to try to parse the 80K packages available in my default set of repos. Currently I'm just moving/deleting /usr/share/bash-completions/completions/dnf to disable the autocomplete entirely, but would be a useful feature if it weren't for the annoying pause. This disablement lasts until the next time dnf is updated. From what I can see, the _dnf_show_packages func is called for install, localinstall, remove, reinstall, etc.. At the least, the localinstall should just check the current directory or whatever path is already prepended. I.e., separate the localinstall completion to use something like: complete -f -o plusdirs -X '!*.@(rpm)' dnf
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
Created attachment 1782207 [details] autocompleting Here an example trying to install pipewire. DNF take long time to autocomplete, as a user of fedora it is not a new thing about DNF. I like DNF and how the information is structured and the order as is presented the result.
Created attachment 1782211 [details] listing podman package
Autocompletion for dnf is still slow in bash, as mentioned in the previous (now automatically closed) bug 1227979. It's a bash-specific problem, i.e. in zsh, tab completion for dnf is almost instant.
Just adding that I noticed this this on Fedora 35.
Created attachment 1863994 [details] fix dnf localinstall autocomplete
I put in a hack to skip the full package list check when doing "localinstall" which is where most of the frustration lies for me. I don't know if much can be done about packages that need to pull form external repos. This was mainly tested on RHEL8 but seems to work on Fedora.
I have submitted a fix https://github.com/rpm-software-management/dnf/pull/1817 which is waiting for review.
The fix was applied upstream. It should be available in the next release of dnf.
Thank you, Robin! This has been bugging me for such a long time (it's been there for years - mentioned in various other bug reports). It's absolutely awesome to hear that it's been finally fixed. Can't wait until the next dnf release gets on my machine :-)
Oh, we must have missed this bz during releasing but it is already in both fedoras 35 and 36.
Just adding that I noticed this this on Fedora 38.