On Thu, Apr 08, 2021 at 06:33:55PM +0200, Julian Andres Klode wrote:
> On Sat, Apr 03, 2021 at 11:05:32AM +0200, Raphael Hertzog wrote:
> > So the latest version doesn't have the same error message (with "cnf"
> > variable being unbound) but it still doesn't fail gracefully when
> > the database is not available.
> > 
> > Instead of asking to file bug reports, it should tell them to run "apt
> > update". This bad behaviour is now generating quite some noise in the
> > Debian bug tracker because we have enabled command-not-found in Kali
> > and when they get it installed during upgrade (as opposed to during a
> > fresh installation), the database is not created during the same apt
> > run and they get this error message when they run a missing command:
> > 
> > > $ lsio
> > > 
> > > Sorry, command-not-found has crashed! Please file a bug report at:
> > > http://www.debian.org/Bugs/Reporting
> > > Please include the following information with the report:
> > > 
> > > command-not-found version: 0.3
> > > Python version: 3.9.2 final 0
> > > Distributor ID: Kali
> > > Description:    Kali GNU/Linux Rolling
> > > Release:        2021.1
> > > Codename:       kali-rolling
> > > Exception information:
> > > 
> > > unable to open database file
> > > Traceback (most recent call last):
> > >   File "/usr/share/command-not-found/CommandNotFound/util.py", line 23, 
> > > in crash_guard
> > >     callback()
> > >   File "/usr/lib/command-not-found", line 90, in main
> > >     cnf = CommandNotFound.CommandNotFound(options.data_dir)
> > >   File "/usr/share/command-not-found/CommandNotFound/CommandNotFound.py", 
> > > line 79, in __init__
> > >     self.db = SqliteDatabase(dbpath)
> > >   File "/usr/share/command-not-found/CommandNotFound/db/db.py", line 12, 
> > > in __init__
> > >     self.con = sqlite3.connect(filename)
> > > sqlite3.OperationalError: unable to open database file
> 
> I forgot to point this out, but this means that the database exists,
> but could not be opened, pointing to a bug in Kali _somewhere_, or a
> resurfacing of a umask issue and non-standard umasks while running 
> apt update.
> 
> -- 
> debian developer - deb.li/jak | jak-linux.org - free software dev
> ubuntu core developer                              i speak de, en

I now found bug 986461 which explains it all.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Reply via email to