Introduce AtomicFiles

Introduce AtomicFile and a test of this module to the code.

AtomicFile is like File, except all writes go to temporary files until
the class method finalize_all () is called and the temporary files are
copied over the real files. If any writes fail, like when there is no
more space on the filesystem, none of the files in the database will be
modified.

Since we need version 1.00 of libfiu, I have only added it to the debian
testing container, which includes libfiu-1.00 in the default repository.

Related to #155
This commit is contained in:
Shaun Ruffell 2020-02-16 12:52:10 -06:00 committed by lauft
parent 6db1d2b859
commit 8e99c07d85
9 changed files with 1039 additions and 6 deletions

View file

@ -2,16 +2,18 @@ FROM debian:testing
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y \
RUN apt-get update && apt-get install -y \
cmake \
fiu-utils=1.00-* \
g++ \
git \
libfiu-dev=1.00-* \
locales \
man \
python3 \
python3-dateutil \
tzdata
tzdata \
&& rm -fr /var/lib/apt/lists/*
# Setup environment
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10