Skip to content

Commit

Permalink
repo_sack: Mark cmdline repo loaded (RhBug:2275530)
Browse files Browse the repository at this point in the history
The command-line repository is not loaded alongside other repositories when calling `load_repos`. It is created on demand when local RPM packages are passed from the command line. Therefore, we need to ensure it's loaded during this process; otherwise, the includes aren't properly initialized in the solver.

This issue arose in the 5.2.0.0 branch with the introduction of the `is_loaded` flag. Before that, the check relied on whether the `solv_repo` was null.

= changelog =
msg: repo_sack: Mark cmdline repo loaded
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2275530
  • Loading branch information
jan-kolarik committed Apr 22, 2024
1 parent 077c7b1 commit 850dbdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libdnf5/repo/repo_sack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ std::map<std::string, libdnf5::rpm::Package> RepoSack::add_cmdline_packages(
}

auto cmdline_repo = get_cmdline_repo();
cmdline_repo->load();

// Ensure that download location for command line repository exists
std::filesystem::path cmd_repo_pkgs_dir{cmdline_repo->get_cachedir()};
Expand Down

0 comments on commit 850dbdb

Please sign in to comment.