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
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" ) pkg.get_ lock(os. path.join( dir, "lock"))
while True:
try:
apt_
break
except:
continue