mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
Override verifyStore to always pass NoRepair for LocalOverlayStore.
This commit is contained in:
parent
58085e4eff
commit
d5cd74a401
3 changed files with 11 additions and 1 deletions
|
@ -188,6 +188,13 @@ void LocalOverlayStore::deleteGCPath(const Path & path, uint64_t & bytesFreed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LocalOverlayStore::verifyStore(bool checkContents, RepairFlag repair)
|
||||||
|
{
|
||||||
|
if (repair)
|
||||||
|
warn("local-overlay: store does not support --verify --repair");
|
||||||
|
return LocalStore::verifyStore(checkContents, NoRepair);
|
||||||
|
}
|
||||||
|
|
||||||
static RegisterStoreImplementation<LocalOverlayStore, LocalOverlayStoreConfig> regLocalOverlayStore;
|
static RegisterStoreImplementation<LocalOverlayStore, LocalOverlayStoreConfig> regLocalOverlayStore;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,8 @@ private:
|
||||||
Callback<std::shared_ptr<const Realisation>> callback) noexcept override;
|
Callback<std::shared_ptr<const Realisation>> callback) noexcept override;
|
||||||
|
|
||||||
void deleteGCPath(const Path & path, uint64_t & bytesFreed) override;
|
void deleteGCPath(const Path & path, uint64_t & bytesFreed) override;
|
||||||
|
|
||||||
|
bool verifyStore(bool checkContents, RepairFlag repair) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ rm -v "$inputDrvFullPath"
|
||||||
find "$storeA" -name "*-dummy" -exec truncate -s 0 {} \;
|
find "$storeA" -name "*-dummy" -exec truncate -s 0 {} \;
|
||||||
|
|
||||||
# Verify should fail with the messages about missing input and modified dummy file
|
# 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 '$inputDrvPath' disappeared, but it still has valid referrers!"
|
||||||
<<<"$verifyOutput" grepQuiet "path '$dummyPath' was modified! expected hash"
|
<<<"$verifyOutput" grepQuiet "path '$dummyPath' was modified! expected hash"
|
||||||
|
<<<"$verifyOutput" grepQuiet "store does not support --verify --repair"
|
||||||
|
|
Loading…
Reference in a new issue