diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-17 10:51:58 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-19 17:05:46 +0200 |
commit | 2296759242b9d057e356170973762b76d9644c6d (patch) | |
tree | a65e833dc50215a4c120f689f7ebef8cd86d2b0d /src/other_tools/just_mr/launch.cpp | |
parent | 31afb92d4e818e55ed6a12bdfe4def54f7e6c826 (diff) | |
download | justbuild-2296759242b9d057e356170973762b76d9644c6d.tar.gz |
Take shared repo-gc lock wherever needed
Diffstat (limited to 'src/other_tools/just_mr/launch.cpp')
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index 1d211cd9..642f5f73 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -25,6 +25,7 @@ #include "src/buildtool/multithreading/task_system.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/garbage_collector.hpp" +#include "src/buildtool/storage/repository_garbage_collector.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/setup.hpp" #include "src/other_tools/just_mr/setup_utils.hpp" @@ -64,6 +65,11 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file, if (subcommand and kKnownJustSubcommands.contains(*subcommand)) { // Read the config file if needed if (kKnownJustSubcommands.at(*subcommand).config) { + auto repo_lock = + RepositoryGarbageCollector::SharedLock(storage_config); + if (not repo_lock) { + return kExitGenericFailure; + } lock = GarbageCollector::SharedLock(storage_config); if (not lock) { return kExitGenericFailure; |