Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRepo refactor #3118

Merged
merged 48 commits into from
Jan 17, 2024
Merged

MRepo refactor #3118

merged 48 commits into from
Jan 17, 2024

Conversation

AntoinePrv
Copy link
Member

@AntoinePrv AntoinePrv commented Jan 9, 2024

The repo never really needed to hold much information, in fact it's always the Pool that hold the data in libsolv.
Close #3066 since this is a total refactor.

The Pool bindings are unfortunately only tested manually. They'll be tests when it is refactored.

Comment on lines +74 to 113
auto add_repo_from_repodata_json(
const fs::u8path& path,
std::string_view url,
solver::libsolv::PipAsPythonDependency add = solver::libsolv::PipAsPythonDependency::No,
solver::libsolv::RepodataParser parser = solver::libsolv::RepodataParser::Mamba
) -> expected_t<solver::libsolv::RepoInfo>;

auto add_repo_from_native_serialization(
const fs::u8path& path,
const solver::libsolv::RepodataOrigin& expected,
solver::libsolv::PipAsPythonDependency add = solver::libsolv::PipAsPythonDependency::No
) -> expected_t<solver::libsolv::RepoInfo>;

template <typename Iter>
auto add_repo_from_packages(
Iter first_package,
Iter last_package,
std::string_view name = "",
solver::libsolv::PipAsPythonDependency add = solver::libsolv::PipAsPythonDependency::No
) -> solver::libsolv::RepoInfo;

template <typename Range>
auto add_repo_from_packages(
const Range& packages,
std::string_view name = "",
solver::libsolv::PipAsPythonDependency add = solver::libsolv::PipAsPythonDependency::No
) -> solver::libsolv::RepoInfo;

auto native_serialize_repo(
const solver::libsolv::RepoInfo& repo,
const fs::u8path& path,
const solver::libsolv::RepodataOrigin& metadata
) -> expected_t<solver::libsolv::RepoInfo>;

void set_installed_repo(const solver::libsolv::RepoInfo& repo);

void
set_repo_priority(const solver::libsolv::RepoInfo& repo, solver::libsolv::Priorities priorities);

void remove_repo(::Id repo_id, bool reuse_ids);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaimergp What do you think of the new API here?

@AntoinePrv AntoinePrv merged commit 7d6856e into mamba-org:main Jan 17, 2024
27 checks passed
@AntoinePrv AntoinePrv deleted the repo branch January 17, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants