diff options
author | Guillaume Maudoux <guillaume.maudoux@uclouvain.be> | 2019-02-28T23·54+0100 |
---|---|---|
committer | Guillaume Maudoux <layus.on@gmail.com> | 2019-03-09T23·56+0100 |
commit | ebc86550f92ec76cda0961ecc625944ec402d2cd (patch) | |
tree | 50c7349a7569139b544c4173ac27064b36a0e432 /src/libstore/remote-store.cc | |
parent | a17f86ce3a67dd2dab2329d7262bc4ad4e7c37ff (diff) |
Make roots a map of store paths to pinning links
This new structure makes more sense as there may be many sources rooting the same store path. Many profiles can reference the same path but this is even more true with /proc/<pid>/maps where distinct pids can and often do map the same store path. This implementation is also more efficient as the `Roots` map contains only one entry per rooted store path.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index def140cfbe18..a4dd28af0ea8 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -606,7 +606,7 @@ Roots RemoteStore::findRoots() while (count--) { Path link = readString(conn->from); Path target = readStorePath(*this, conn->from); - result[link] = target; + result[target].emplace(link); } return result; } |