Comment 3 for bug 1820886

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

Something like that Python script should be enough really to catch most issues:

import apt_pkg, os

apt_pkg.init()

dir = apt_pkg.config.find_dir("Dir::Cache::Archives")
while True:
  try:
    apt_pkg.get_lock(os.path.join(dir, "lock"))
    break
  except:
    continue