Bug 2232052

Summary: Bash completion no longer works due to sqlite upstream changes
Product: [Fedora] Fedora Reporter: grumpey0
Component: dnfAssignee: David Cantrell <dcantrell>
Status: CLOSED COMPLETED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 39CC: daniel.mach, jdiggs, jkolarik, jmracek, jrohel, mblaha, mcatanza, packaging-team-maint, pkratoch, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-4.17.0-6.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-04 08:14:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description grumpey0 2023-08-15 03:45:34 UTC
Description of problem:
when attempting to utilize tab completion. 

sudo dnf install bash
Error: in prepare, no such column: bash%
  select pkg from available where pkg like "bash%" and pkg not in (select pkg fr
                             error here ---^

Version-Release number of selected component (if applicable):
4.16.2
  Installed: dnf-0:4.16.2-2.fc39.noarch at Tue 15 Aug 2023 02:54:45 AM GMT
  Built    : Fedora Project at Fri 04 Aug 2023 11:19:30 AM GMT

  Installed: rpm-0:4.18.92-1.fc39.x86_64 at Tue 15 Aug 2023 02:54:13 AM GMT
  Built    : Fedora Project at Wed 02 Aug 2023 05:06:29 PM GMT


How reproducible:
every time currently

Steps to Reproduce:
1.sudo dnf install bash
2.hit tab to autocomplete entry
3.

Actual results:
Error: in prepare, no such column: bash%
  select pkg from available where pkg like "bash%" and pkg not in (select pkg fr
                             error here ---^

Expected results:

package name autocompleted. 
Additional info:

Comment 1 grumpey0 2023-08-20 03:10:09 UTC
Modifying /usr/share/bash-completion/completions/dnf line 115: 
from: local query="select pkg from $table WHERE pkg LIKE \"$prefix%\""
to: local query="select pkg from $table where pkg like '$prefix%'"

appears to resolve.

Comment 2 grumpey0 2023-08-20 11:42:10 UTC
Submitted, https://github.com/rpm-software-management/dnf/pull/1979 this appears to be related to https://sqlite.org/src/info/c995932c3ffe7f27

Comment 3 David Cantrell 2023-08-21 12:51:29 UTC
Changed merged, thanks for the report:

https://github.com/rpm-software-management/dnf/pull/1979

Comment 4 Jan Kolarik 2023-09-01 14:17:51 UTC
*** Bug 2236786 has been marked as a duplicate of this bug. ***