• 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 Loading commit data...
aptsources Loading commit data...
data/templates Loading commit data...
debian Loading commit data...
doc Loading commit data...
po Loading commit data...
python Loading commit data...
tests Loading commit data...
typehinting Loading commit data...
utils Loading commit data...
.gitlab-ci.yml Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING.GPL Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
TODO Loading commit data...
pre-build.sh Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...