debian-forge/osbuild
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
..
formats osbuild: auto-detect best available runner 2022-10-11 12:49:16 +02:00
util util: add module to parse PE32+ files 2022-11-14 20:10:59 +01:00
__init__.py Post release version bump 2022-11-09 08:19:42 +00:00
__main__.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
api.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
buildroot.py buildroot: explicitly bind mount runner 2022-10-11 12:49:16 +02:00
devices.py devices: convert tree to str during serialization 2022-11-21 17:26:53 +01:00
host.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
inputs.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
loop.py loop: silence W0201 (attribute outside init) in set_status 2022-05-06 17:33:23 +02:00
main_cli.py osbuild: share terminal formats between files 2022-09-09 21:43:56 +02:00
meta.py meta: ensure we have an absolute path for Index 2022-10-11 12:49:16 +02:00
monitor.py monitor/log: show build root and runner 2022-10-11 12:49:16 +02:00
mounts.py mounts: convert paths to str during serialization 2022-11-21 17:26:53 +01:00
objectstore.py objectstore: direct path i/o for Object 2022-11-21 17:26:53 +01:00
pipeline.py objectstore: direct path i/o for Object 2022-11-21 17:26:53 +01:00
remoteloop.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
sources.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00