From 10975cfaa1c96436ad3c24b0bfc610c1b4e4bad2 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 15 Nov 2024 16:06:03 -0500 Subject: [PATCH] Reset group / mode / etc. on a pre-existing store --- src/action/common/provision_nix.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/action/common/provision_nix.rs b/src/action/common/provision_nix.rs index a2efeb582..0bc71413b 100644 --- a/src/action/common/provision_nix.rs +++ b/src/action/common/provision_nix.rs @@ -70,12 +70,21 @@ impl Action for ProvisionNix { fetch_nix, create_nix_tree, move_unpacked_nix, - nix_store_gid: _, // TODO @grahamc ... have a description, I guess + nix_store_gid, // TODO @grahamc ... have a description, I guess } = &self; let mut buf = Vec::default(); buf.append(&mut fetch_nix.describe_execute()); + if std::path::Path::new(NIX_STORE_LOCATION).exists() { + buf.push(ActionDescription::new( + "Synchronize /nix/store ownership".to_string(), + vec![format!( + "Will update existing files in the Nix Store to use the Nix build group ID {nix_store_gid}" + )], + )); + } + buf.append(&mut create_nix_tree.describe_execute()); buf.append(&mut move_unpacked_nix.describe_execute());