Skip to content

Commit

Permalink
cacheonly: Turn off build_cache when running only from cache
Browse files Browse the repository at this point in the history
No need to rebuild solv cache files when using only cached metadata.
  • Loading branch information
jan-kolarik committed Aug 2, 2023
1 parent 29350cf commit 0ac9924
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libdnf5/base/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ void Base::setup() {
config.get_cachedir_option().set(Option::Priority::DEFAULT, config.get_system_cachedir_option().get_value());
}

// If only cached metadata are used, disable rebuilding solv cache files.
if (config.get_cacheonly_option().get_value() != "none") {
config.get_build_cache_option().set(Option::Priority::RUNTIME, false);
}

load_plugins();
p_impl->plugins.init();

Expand Down

0 comments on commit 0ac9924

Please sign in to comment.