about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRob Vermaas <rob.vermaas@gmail.com>2005-10-29T15·44+0000
committerRob Vermaas <rob.vermaas@gmail.com>2005-10-29T15·44+0000
commitf0856fd905ea727e88f3fc14d3c717679ce8359b (patch)
tree9d5926acab409af321a8c4e04151137257fd77e9 /src
parent92d599c6a7e7d197fa41167967860628b0f51e60 (diff)
* Repair the referers table from the references table.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/store.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 3c91c8e3849e..4e163605a49f 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -844,6 +844,9 @@ void verifyStore(bool checkContents)
                 if (referers.find(*i) == referers.end()) {
                     printMsg(lvlError, format("missing referer mapping from `%1%' to `%2%'")
                         % *j % *i);
+                    referers.insert(*i);
+                    nixDB.setStrings(txn, dbReferers, *j,
+                        Paths(referers.begin(), referers.end()));
                 }
                 if (isValid && validPaths.find(*j) == validPaths.end()) {
                     printMsg(lvlError, format("incomplete closure: `%1%' needs missing `%2%'")