1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Override verifyStore to always pass NoRepair for LocalOverlayStore.

This commit is contained in:
Ben Radford 2023-07-18 13:49:13 +01:00
parent 58085e4eff
commit d5cd74a401
No known key found for this signature in database
GPG key ID: 9DF5D4640AB888D5
3 changed files with 11 additions and 1 deletions

View file

@ -34,6 +34,7 @@ rm -v "$inputDrvFullPath"
find "$storeA" -name "*-dummy" -exec truncate -s 0 {} \;
# Verify should fail with the messages about missing input and modified dummy file
verifyOutput=$(expectStderr 1 nix-store --store "$storeB" --verify --check-contents)
verifyOutput=$(expectStderr 1 nix-store --store "$storeB" --verify --check-contents --repair)
<<<"$verifyOutput" grepQuiet "path '$inputDrvPath' disappeared, but it still has valid referrers!"
<<<"$verifyOutput" grepQuiet "path '$dummyPath' was modified! expected hash"
<<<"$verifyOutput" grepQuiet "store does not support --verify --repair"