debian-forge/test
Christian Kellner f8ca0cf4bc objectstore: direct path i/o for Object
The `Object.{read,write}` methods were introduced to implement
copy on write support. Calling `write` would trigger the copy,
if the object had a `base`. Additionally, a level of indirection
was introduced via bind mounts, which allowed to hide the actual
path of the object in the store and make sure that `read` really
returned a read-only path.
Support for copy-on-write was recently removed[1], and thus the
need for the `read` and `write` methods. We lose the benefits
of the indirection, but they are not really needed: the path to
the object is not really hidden since one can always use the
`resolve_ref` method to obtain the actual store object path.
The read only property of build trees is ensured via read only
bind mounts in the build root.
Instead of using `read` and `write`, `Object` now gained a new
`tree` property that is the path to the objects tree and also
is implementing `__fspath__` and so behaves like an `os.PathLike`
object and can thus transparently be used in many places, like
e.g. `os.path.join` or `pathlib.Path`.

[1] 5346025031
2022-11-21 17:26:53 +01:00
..
cases osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
data test/data: persist the journal for ostree images 2022-11-16 17:51:56 +01:00
mod objectstore: direct path i/o for Object 2022-11-21 17:26:53 +01:00
run osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
src test/src: improve file enumeration 2022-09-23 12:08:10 +02:00
.gitignore introduce testing script 2019-07-09 10:29:48 +02:00
__init__.py osbuild: add description() methods 2019-08-07 10:01:17 +02:00
initrd.py test: explicit encodings for open() 2022-09-09 15:33:29 +02:00
test.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00