race condition between multiple calls of add_additional_packages and/or remove_additional_packages
if the config file is written between when the packages are read and
when the packages are written, this change will be overwritten by the
subsequent write. You could fix this by acquiring a file lock before
reading the file, for example with fcntl.flock(f, fcntl.LOCK_EX), and
only releasing the lock once the file was written (example:
https://gitlab.com/segfault3/onionkit/blob/master/onionkit/util.py#L21).
This way you could also get rid of the python3-atomicwrites package
Parent Task: #15838 (closed)
Related issues
- Has duplicate #16034
Original created by @alant on 15982 (Redmine)