aboutsummaryrefslogtreecommitdiff
path: root/etc/guix-install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/guix-install.sh')
0 files changed, 0 insertions, 0 deletions
mp; refs, HashResult & hash) { RefScanSink sink; std::map<string, Path> backMap; /* For efficiency (and a higher hit rate), just search for the hash part of the file name. (This assumes that all references have the form `HASH-bla'). */ foreach (PathSet::const_iterator, i, refs) { string baseName = baseNameOf(*i); string::size_type pos = baseName.find('-'); if (pos == string::npos) throw Error(format("bad reference `%1%'") % *i); string s = string(baseName, 0, pos); assert(s.size() == refLength); assert(backMap.find(s) == backMap.end()); // parseHash(htSHA256, s); sink.hashes.insert(s); backMap[s] = *i; } /* Look for the hashes in the NAR dump of the path. */ dumpPath(path, sink); /* Map the hashes found back to their store paths. */ PathSet found; foreach (StringSet::iterator, i, sink.seen) { std::map<string, Path>::iterator j; if ((j = backMap.find(*i)) == backMap.end()) abort(); found.insert(j->second); } hash = sink.hashSink.finish(); return found; } }