From 6963de209135d191bdb67cf126df4dda9b19d44e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 Apr 2016 17:34:31 +0200 Subject: nix verify --all: Support local binary caches --- src/libstore/local-binary-cache-store.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libstore/local-binary-cache-store.cc') diff --git a/src/libstore/local-binary-cache-store.cc b/src/libstore/local-binary-cache-store.cc index b6e72b039215..2c2944938761 100644 --- a/src/libstore/local-binary-cache-store.cc +++ b/src/libstore/local-binary-cache-store.cc @@ -33,6 +33,20 @@ protected: std::shared_ptr getFile(const std::string & path) override; + PathSet queryAllValidPaths() override + { + PathSet paths; + + for (auto & entry : readDirectory(binaryCacheDir)) { + if (entry.name.size() != 40 || + !hasSuffix(entry.name, ".narinfo")) + continue; + paths.insert(settings.nixStore + "/" + entry.name.substr(0, entry.name.size() - 8)); + } + + return paths; + } + }; void LocalBinaryCacheStore::init() -- cgit 1.4.1