Skip to content

Commit

Permalink
Make libdnf5::repo::Repo::load private
Browse files Browse the repository at this point in the history
  • Loading branch information
kontura committed Mar 26, 2024
1 parent 627ad27 commit e48db7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
11 changes: 5 additions & 6 deletions include/libdnf5/repo/repo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ class Repo {
/// @return `true` if metadata are in sync with the origin, `false` otherwise.
bool is_in_sync();

/// @deprecated It is going to be removed without a warning
/// Loads the repository objects into sacks.
///
/// Also writes the libsolv's solv/solvx cache files.
void load();

/// Returns whether the using of "includes" is enabled
/// If enabled, only packages listed in the "includepkgs" will be used from the repository.
// @replaces libdnf:repo/Repo.hpp:method:Repo.getUseIncludes()
Expand Down Expand Up @@ -326,6 +320,11 @@ class Repo {
friend class PackageDownloader;
friend class solv::Pool;

/// Loads the repository objects into sacks.
///
/// Also writes the libsolv's solv/solvx cache files.
void load();

/// Downloads repository metadata.
// @replaces libdnf:repo/Repo.hpp:method:Repo.downloadMetadata(const std::string & destdir)
void download_metadata(const std::string & destdir);
Expand Down
8 changes: 5 additions & 3 deletions test/libdnf5/repo/test_repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "test_repo.hpp"

#include "../shared/private_accessor.hpp"
#include "utils/string.hpp"

#include <libdnf5/base/base.hpp>

#include <filesystem>


CPPUNIT_TEST_SUITE_REGISTRATION(RepoTest);

// Accessor of private Base::p_impl, see private_accessor.hpp
create_private_getter_template;
create_getter(load, &libdnf5::repo::Repo::load);

void RepoTest::test_load_system_repo() {
// TODO(lukash) there's no rpmdb in the installroot, create data for the test
repo_sack->get_system_repo()->load();
(*(repo_sack->get_system_repo()).*get(load{}))();
}

namespace {
Expand Down
5 changes: 0 additions & 5 deletions test/ruby/libdnf5/repo/test_repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@


class TestRepo < BaseTestCase
def test_load_system_repo()
# TODO(lukash) there's no rpmdb in the installroot, create data for the test
@repo_sack.get_system_repo().load()
end

class DownloadCallbacks < Repo::DownloadCallbacks
attr_accessor :start_cnt, :start_what
attr_accessor :end_cnt, :end_error_message
Expand Down

0 comments on commit e48db7e

Please sign in to comment.