Bug 1479330 - DNF 2.0: bash-completion not working by default, until sqlite is installed
DNF 2.0: bash-completion not working by default, until sqlite is installed
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
26
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Igor Gnatenko
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 07:28 EDT by rockonthemoonfm
Modified: 2018-06-28 04:29 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-01-03 10:08:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description rockonthemoonfm 2017-08-08 07:28:31 EDT
even if /usr/share/bash-completion/completions/dnf is present, DNF version 2.0 lost auto-completion in my system - probably due to new version breakage?
It's a very useful feature when removing, but also installing packages!
Comment 1 Igor Gnatenko 2017-08-09 06:49:04 EDT
What means that it doesn't work?
Comment 2 jeremy9856 2017-09-09 13:23:28 EDT
Is it a duplicate bug 1490049 ?
Comment 3 jeremy9856 2017-09-10 04:12:31 EDT
So it seem that bug 1490049 is a duplicate. Here is what happened :

The completion doesn't work ootb for dnf on KDE spin (work ootb on official Fedora). I found that it can be because the file /etc/bash_completion.d/dnf-completion.bash is missing.

https://ask.fedoraproject.org/en/question/69318/dnf-bash-completion/?answer=69324#post-id-69324

Well after I added that file and rebooted dnf bash completion worked again !

I removed the file and rebooted waiting for a proper fix and dnf bash completion is still working !

The dnf-completion.bash is an old version of the file /usr/share/bash-completion/completions/dnf that is installed by dnf. 

Now if I remove this file (/usr/share/bash-completion/completions/dnf) the dnf bash completion doesn't work and if I put it back the dnf completion work again.

Don't know why it didn't work ootb and work now. Creating a /etc/bash_completion.d/dnf-completion.bash file that contain the same content as /usr/share/bash-completion/completions/dnf somewhat triggered the dnf completion.
Comment 4 jeremy9856 2017-09-10 10:13:23 EDT
I thought it was working ootb on official Fedora but no. That said after I finished to install and tweak it the dnf completion was working !
Comment 5 Fabio Valentini 2017-09-17 03:38:06 EDT
Installing the sqlite package fixed it for me. Why that package isn't part of a default install of f26 I don't know.
Comment 6 jeremy9856 2017-09-17 04:13:39 EDT
Well that worked, thanks ! What surprise me it's on a previous install of Fedora 26, installing sqlite didn't made bash completion work.
Comment 7 Parag Nemade 2017-09-17 09:04:59 EDT
I installed Fedora 27 on my laptop which was running find Fedora 26 along with bash completion. Since then bash completion has stopped working. I tried to find what else I have missing but could not find. I think I have all the needed files/packages and bash completion for commands like "dnf install TAB TAB" should work but it is not working.

So question is has something got broken recently? I have these packages
$ rpm -qa | grep dnf |sort
dnf-2.6.3-11.fc27.noarch
dnf-conf-2.6.3-11.fc27.noarch
dnf-plugins-core-2.1.3-2.fc27.noarch
dnf-yum-2.6.3-11.fc27.noarch
libdnf-0.9.3-7.fc27.x86_64
python2-dnf-2.6.3-11.fc27.noarch
python3-dnf-2.6.3-11.fc27.noarch
python3-dnf-plugins-core-2.1.3-2.fc27.noarch
libsolv-0.6.29-1.fc27.x86_64
libdnf-0.9.3-7.fc27.x86_64
Comment 8 Parag Nemade 2017-09-17 09:21:25 EDT
Looks like after installing sqlite package bash completion start to work.
Comment 9 Kamil Páral 2017-10-04 09:12:44 EDT
I can confirm this. dnf completion on package names (dnf install ht<TAB>) is not working, until "sqlite" package gets installed. Please fix.
Comment 10 Igor Gnatenko 2018-01-03 10:08:59 EST

*** This bug has been marked as a duplicate of bug 1469667 ***
Comment 11 Jaroslav Mracek 2018-06-28 04:29:37 EDT
The issue is solved by dnf-3.0.1-1 that was released into rawhide.

Note You need to log in before you can comment on or make changes to this bug.