mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
refactor(rootfs): split the entry cache into cache.rs
The cache stopped being an implementation detail of the rootfs lifecycle: entry naming, the advisory lock, digest freshness, provisioned-layer pointers, and extraction-to-scratch are a store in their own right. cache.rs now owns RootfsCache's paths, pointers and extraction products; rootfs.rs keeps the lifecycle API (PrepareRequest, PreparedRootfs, prepare, prepare_provisioned). resolve_source moves next to its inputs in distro. Pure movement - naming still derives its extension from the URL, next commit changes that.
This commit is contained in:
1 parent
52d734063f
commit
479dfb79d0
6 files changed
+657
-627
No files matched your search
@@ -37,7 +37,8 @@ fn cmd_provision(
|
||||
command: &[String],
|
||||
cli_verbose: bool,
|
||||
) -> std::process::ExitCode {
|
||||
use ecrou::rootfs::{PrepareRequest, RootfsCache};
|
||||
use ecrou::cache::RootfsCache;
|
||||
use ecrou::rootfs::PrepareRequest;
|
||||
use ecrou::spec::ProvisionSpec;
|
||||
|
||||
// Two shapes: `provision IMAGE -- COMMAND` bakes a one-off
|
||||
@@ -251,7 +252,7 @@ fn cmd_probe() -> std::process::ExitCode {
|
||||
}
|
||||
|
||||
print!("cache: ");
|
||||
match ecrou::rootfs::RootfsCache::default_dir() {
|
||||
match ecrou::cache::RootfsCache::default_dir() {
|
||||
Ok(dir) => {
|
||||
// The run flow creates the cache on demand; probe mirrors it.
|
||||
if let Err(err) = std::fs::create_dir_all(&dir) {
|
||||
|
||||
Reference in new issue
Block a user