command-not-found-data package is unnecessary

Bug #1844651 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Fix Released
Medium
Unassigned
Eoan
Fix Released
Medium
Unassigned

Bug Description

The command-not-found package has been modified to get command information (Commands-* files) from the Ubuntu archive subsequently the command-not-found-data package, which requires regular manually updating, should be removed. As a reference here is a previous changelog entry regarding dropping the package.

command-not-found (18.04.0~pre1) bionic; urgency=medium

  * New version:
    - switch from gdbm to sqlite (smaller files and faster searches)
    - will fetch "dists/bionic/*/binary-*/cnf/Commands-* files
      once the archive provides them
    - CLI output follows what is outlined in LP: #1749777
    - command-not-found-data switched to consume Commands-* files
      (package can be dropped/emptied once server side Commands-* files
       are available)
    - support for suggestions based on snap packages
    - add autopkgtest to the package

 -- Michael Vogt <email address hidden> Wed, 28 Feb 2018 14:26:58 +0100

That being said it would be good if the commands.db (/usr/share/command-not-found/commands.db) was built during the image building process so that command-not-found will work immediately after installation.

Additionally, if commands.db does not exist command-not-found should produce an error message along the lines of "No command-not-found database generated yet, please run "sudo apt update"".

Changed in command-not-found (Ubuntu Eoan):
status: New → Triaged
importance: Undecided → Medium
tags: added: id-5d8357f8b3d2016342810458
Revision history for this message
Steve Langasek (vorlon) wrote :

dists/bionic/*/binary-*/cnf/Commands-* do not exist at all on the mirror network, so it's not clear to me that the replacement for command-not-found-data is actually implemented at all or where the metadata lives.

Changed in command-not-found (Ubuntu Eoan):
status: Triaged → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

ok, I confirmed they are present for disco and later. http://archive.ubuntu.com/ubuntu/dists/disco/main/cnf/

Changed in command-not-found (Ubuntu Eoan):
status: Incomplete → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

With regards to the image building process I booted an Ubuntu 19.10 Beta iso with serial 20191001.2 and the commands.db file was located in /var/lib/command-not-found/ with a date of October 1st. So it seems that image building process, at least for desktop CDs, already includes the updated commands.db file.

Revision history for this message
Brian Murray (brian-murray) wrote :

Additionally, after installing the system the commands.db file was located in /var/lib/command-not-found/ and contained the updated information regarding installing mlocate for locate.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Uploaded 19.10.0 without that package, and with some test suite fixes to make it work even on systems where no database has been populated yet.

We do not expect there to be any images that do not have a pre-populated database, hence there should be no need for a UI freeze exception, as the new string will never be shown.

Changed in command-not-found (Ubuntu Eoan):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package command-not-found - 19.10.0

---------------
command-not-found (19.10.0) eoan; urgency=medium

  * If the database is absent, do not crash with a backtrace, but tell the
    user to run apt update.
  * Remove the command-not-found-data package (LP: #1844651)

 -- Julian Andres Klode <email address hidden> Mon, 07 Oct 2019 17:08:21 +0200

Changed in command-not-found (Ubuntu Eoan):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.