mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-31 23:46:48 +02:00
Fix LocalOverlayStore::queryPathInfoUncached
, FIXME in test
This commit is contained in:
parent
5406256d78
commit
59a8099038
2 changed files with 14 additions and 12 deletions
|
@ -33,21 +33,24 @@ void LocalOverlayStore::queryPathInfoUncached(const StorePath & path,
|
|||
|
||||
auto callbackPtr = std::make_shared<decltype(callback)>(std::move(callback));
|
||||
|
||||
// If we don't have it, check lower store
|
||||
LocalStore::queryPathInfoUncached(path,
|
||||
{[this, path, callbackPtr](std::future<std::shared_ptr<const ValidPathInfo>> fut) {
|
||||
try {
|
||||
(*callbackPtr)(fut.get());
|
||||
auto info = fut.get();
|
||||
if (info)
|
||||
return (*callbackPtr)(std::move(info));
|
||||
} catch (...) {
|
||||
lowerStore->queryPathInfo(path,
|
||||
{[path, callbackPtr](std::future<ref<const ValidPathInfo>> fut) {
|
||||
try {
|
||||
(*callbackPtr)(fut.get().get_ptr());
|
||||
} catch (...) {
|
||||
callbackPtr->rethrow();
|
||||
}
|
||||
}});
|
||||
return callbackPtr->rethrow();
|
||||
}
|
||||
// If we don't have it, check lower store
|
||||
lowerStore->queryPathInfo(path,
|
||||
{[path, callbackPtr](std::future<ref<const ValidPathInfo>> fut) {
|
||||
try {
|
||||
(*callbackPtr)(fut.get().get_ptr());
|
||||
} catch (...) {
|
||||
return callbackPtr->rethrow();
|
||||
}
|
||||
}});
|
||||
}});
|
||||
}
|
||||
|
||||
|
|
|
@ -58,8 +58,7 @@ diff $(toRealPath "$storeA/nix/store" "$path") $(toRealPath "$TEST_ROOT/merged-s
|
|||
nix-store --verify-path --store "$storeA" "$path"
|
||||
|
||||
# Verifying path in merged-store
|
||||
# FIXME should succeed
|
||||
expect 1 nix-store --verify-path --store "$storeB" "$path"
|
||||
nix-store --verify-path --store "$storeB" "$path"
|
||||
|
||||
### Do a redundant add
|
||||
|
||||
|
|
Loading…
Reference in a new issue