Fix repair test

http://hydra.nixos.org/build/30001635
This commit is contained in:
Eelco Dolstra 2016-01-07 13:52:48 +01:00
parent 02a66b3fd7
commit 2ef7e2e795

View file

@ -18,6 +18,18 @@ if nix-store --verify --check-contents -v; then
exit 1 exit 1
fi fi
# The path can be repaired by rebuilding the derivation.
nix-store --verify --check-contents --repair
nix-store --verify-path $path2
# Re-corrupt and delete the deriver. Now --verify --repair should
# not work.
chmod u+w $path2
touch $path2/bad
nix-store --delete $(nix-store -qd $path2)
if nix-store --verify --check-contents --repair; then if nix-store --verify --check-contents --repair; then
echo "nix-store --verify --repair succeeded unexpectedly" >&2 echo "nix-store --verify --repair succeeded unexpectedly" >&2
exit 1 exit 1