bash-completion incorrectly shows source package names for APT
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Focal |
Fix Released
|
Low
|
Unassigned | ||
Groovy |
Fix Released
|
Low
|
Unassigned | ||
Hirsute |
Fix Released
|
Low
|
Unassigned |
Bug Description
[Impact]
Source packages have been included in apt-cache pkgnames, and virtual packages have not been included in apt-cache pkgnames --all-names. The former leads to completions autocompleting to source package names where they only should complete to binaries.
[Test case]
An automated test case is included in the test suite
test-ubuntu-bug-1876495-pkgnames-virtual
It verifies that pkgnames does not return source package names, and that pkgnames --all-names does return source package names and virtual package names.
[Where problems could occur]
In the pkgnames command only. If there's a bug, it could exclude or include packages it should not.
[Original bug report]
Steps to reproduce:
1. Have Ubuntu 20.04 LTS installed
2. Open terminal, enter one of the commands below
2a. apt install brisk<Tab>
2b. apt source brisk-menu<Tab>
2c. apt-get install brisk<Tab>
2d. apt-get source brisk-menu<Tab>
2e. apt-cache policy brisk<Tab>
Expected results:
* The bash-completion should not lead to package name as there are no binary packages named with starting part "brisk" (see https:/
Actual results:
* all commands below get completed to the name of source package - in this example named "brisk-menu"
(see https:/
ProblemType: Bug
DistroRelease: Ubuntu Kylin 20.04
Package: bash-completion 1:2.10-1ubuntu1 [origin: Ubuntu]
ProcVersionSign
Uname: Linux 5.4.0-28-lowlatency x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: MATE
Date: Sat May 2 20:35:48 2020
Dependencies:
InstallationDate: Installed on 2020-04-22 (9 days ago)
InstallationMedia: Ubuntu-MATE 20.04 LTS "Focal Fossa" - Release amd64 (20200422)
PackageArchitec
SourcePackage: bash-completion
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in apt (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in bash-completion (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in bash-completion (Ubuntu): | |
status: | Triaged → Invalid |
Changed in apt (Ubuntu): | |
status: | Triaged → In Progress |
Changed in apt (Ubuntu): | |
status: | In Progress → Fix Committed |
description: | updated |
description: | updated |
no longer affects: | bash-completion (Ubuntu Hirsute) |
no longer affects: | bash-completion (Ubuntu Groovy) |
no longer affects: | bash-completion (Ubuntu Focal) |
no longer affects: | bash-completion (Ubuntu) |
Changed in apt (Ubuntu Focal): | |
importance: | Undecided → Low |
Changed in apt (Ubuntu Groovy): | |
importance: | Undecided → Low |
source is certainly a bad example, as it does take source names. But yes, this is a minor inconvenience sometimes.
This needs quite a bit of work to fix, in a coordinated fashion, across the two packages, and I'm not sure it's worth it. Probably needs some investigation whether we already return some other invalid names.