• Julian Andres Klode's avatar
    apt.Cache: Fix (un)locking of archives · 9de87aea
    Julian Andres Klode authored
    It seems that for unknown reasons, the fetcher was not
    released after commit() ended, although it should have
    been out of references.
    
    Rewrite the code to use an explicit lock context manager
    instead, this avoids the need of attaching the lock to
    the acquire object and makes the code easier to understand.
    
    We have to wrap apt_pkg.FileLock in another class to raise
    the expected exceptions, and we need to have only one instance
    of that class in the cache, as we might nest locks within each
    other (_fetch_archives called in commit), and FileLock counts
    the number of locks in its instance.
    
    Closes: #922416
    9de87aea
Name
Last commit
Last update
..
apt_inst.pyi Loading commit data...
apt_pkg.pyi Loading commit data...