debian-forge/osbuild
David Rheinsberg 8a9efa89fc util/fscache: provide store_tree() helper
Add a helper that copies an entire directory tree including all metadata
into the cache. Use it in the ObjectStore to commit entries.

Unlike FsCache.store() this does not require entering the context from
the call-site. Instead, all data is directly passed to the cache and the
operation is under full control of the cache.

The ObjectStore is adjusted to make use of this. This requires exposing
the root-path (rather than the tree-path) to be accessible for
individual objects, hence a `path`-@property is added alongside the
`tree`-@property. Note that `__fspath__` still refers to the tree-path,
since this is the only path really required for outside access other
than from the object-manager itself.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
2022-12-20 16:56:32 +01:00
..
formats format: read metadata from object not result 2022-12-09 12:03:40 +01:00
util util/fscache: provide store_tree() helper 2022-12-20 16:56:32 +01:00
__init__.py Post release version bump 2022-12-07 08:15:17 +00:00
__main__.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
api.py pipeline,api: write metadata directly 2022-12-09 12:03:40 +01:00
buildroot.py buildroot: explicitly bind mount runner 2022-10-11 12:49:16 +02:00
devices.py devices: new helper to ensure a device node exists 2022-11-22 18:28:38 +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 osbuid: integrate FsCache into ObjectStore 2022-12-09 12:03:40 +01:00
meta.py meta: ensure we have an absolute path for Index 2022-10-11 12:49:16 +02:00
monitor.py monitor: show pipeline's source epoch 2022-12-15 13:10:35 +00:00
mounts.py mounts: use the options object for mountopts 2022-11-30 14:21:10 +01:00
objectstore.py util/fscache: provide store_tree() helper 2022-12-20 16:56:32 +01:00
pipeline.py pipeline: set source_epoch for tree 2022-12-15 13:10:35 +00: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