This is a working reproducer:
sudo cp /var/lib/command-not-found/commands.db /var/lib/command-not-found/commands.db.tmp sudo sqlite3 /var/lib/command-not-found/commands.db.tmp SQLite version 3.31.1 2020-01-27 19:55:54 Enter ".help" for usage hints. sqlite> PRAGMA locking_mode = EXCLUSIVE; exclusive sqlite> BEGIN EXCLUSIVE; sqlite>
sudo rm /var/lib/command-not-found/commands.db.metadata sudo PYTHONPATH=. ./cnf-update-db --verbose Traceback (most recent call last): File "./cnf-update-db", line 26, in <module> col.create(db) File "/home/lukas/canonical/01-Distro/command-not-found/CommandNotFound/db/creator.py", line 92, in create con.executescript(create_db_sql) sqlite3.OperationalError: database is locked
This is a working reproducer:
sudo cp /var/lib/ command- not-found/ commands. db /var/lib/ command- not-found/ commands. db.tmp command- not-found/ commands. db.tmp
sudo sqlite3 /var/lib/
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> PRAGMA locking_mode = EXCLUSIVE;
exclusive
sqlite> BEGIN EXCLUSIVE;
sqlite>
sudo rm /var/lib/ command- not-found/ commands. db.metadata lukas/canonical /01-Distro/ command- not-found/ CommandNotFound /db/creator. py", line 92, in create executescript( create_ db_sql) OperationalErro r: database is locked
sudo PYTHONPATH=. ./cnf-update-db --verbose
Traceback (most recent call last):
File "./cnf-update-db", line 26, in <module>
col.create(db)
File "/home/
con.
sqlite3.