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

Adjust to error messages containing repo #1500

Merged
merged 1 commit into from
May 27, 2024
Merged

Conversation

m-blaha
Copy link
Member

@m-blaha m-blaha commented May 2, 2024

Solver errors now also include the repository from which the problematic
package originates.

Requires: rpm-software-management/dnf5#1464

@m-blaha
Copy link
Member Author

m-blaha commented May 2, 2024

/packit test rpm-software-management/dnf5#1464

- labirinto-libs-2.0-1.noarch does not belong to a distupgrade repository
- problem with installed package
Problem: package labirinto-2.0-1.noarch from @System requires labirinto-libs = 2.0-1, but none of the providers can be installed
- labirinto-libs-2.0-1.noarch from @System does not belong to a distupgrade repository
Copy link
Contributor

Choose a reason for hiding this comment

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

What about to split message and when the problem is related to installed packages write something like installed package {} does not .... What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking about it - the @System repo name is a bit cryptic for a new user.
We can split SOLVER_RULE_PKG_REQUIRES according the repo into two variants of messages - ProblemRules::RULE_PKG_CONFLICTS or ProblemRules::RULE_INSTALLED_PKG_CONFLICTS.
But there are more solver rules that would need to be split. For example SOLVER_RULE_PKG_CONFLICTS would need three variants - source installed, target installed, none installed (not sure whether there can be variant where both source and target packages are installed).
I was even thinking about having only one {} placeholder in the message and filling it either with package <nevra> from <repoid> or with installed package <nevra> "submessage" but considered this variant complicated for translators - I was not sure whether splitting a sentence into multiple translation strings would correctly work for every language.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking about approach that we used in DNF4 for {RULE_PKG_INSTALLED_OBSOLETES, M_("installed package %s obsoletes %s provided by %s from %s")}, {RULE_PKG_IMPLICIT_OBSOLETES, M_("package %s from %s implicitly obsoletes %s provided by %s from %s")},.
This approach is easy for translation but requires to extend enum. The new items must be added as last items. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've adjusted messages for installed packages, now they say "installed package Pkg" instead of "Pkg from @System". Thanks.

Solver errors now also include the repository from which the problematic
package originates.
@m-blaha m-blaha force-pushed the mblaha/libsolv-errors-repoid branch from 063c335 to 8617cd3 Compare May 22, 2024 13:28
@j-mracek
Copy link
Contributor

/packit test rpm-software-management/dnf5#1464

@j-mracek j-mracek merged commit 43b04c9 into main May 27, 2024
4 of 8 checks passed
@j-mracek j-mracek deleted the mblaha/libsolv-errors-repoid branch May 27, 2024 09:28
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