From 9958bd6992e2b3e7bacb493a372d17d5a5b95d90 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 2 Oct 2012 14:08:59 -0400 Subject: Add operation ‘nix-store --repair-path’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This operation allows fixing corrupted or accidentally deleted store paths by redownloading them using substituters, if available. Since the corrupted path cannot be replaced atomically, there is a very small time window (one system call) during which neither the old (corrupted) nor the new (repaired) contents are available. So repairing should be used with some care on critical packages like Glibc. --- src/libstore/local-store.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libstore/local-store.hh') diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index 8899873a72c6..80db10de10d0 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -197,6 +197,10 @@ public: void vacuumDB(); + /* Repair the contents of the given path by redownloading it using + a substituter (if available). */ + void repairPath(const Path & path); + private: Path schemaPath; -- cgit 1.4.1