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

filterAdvisory: match installed_solvables sort with lower_bound (RhBug:2212838) #1606

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Jun 27, 2023

std::lower_bound expects that the range it operates on is sorted by the provided comparator.

lower_bound() is used on installed_solvables twice, first with comparator NameSolvableComparator and later with SolvableCompareAdvisoryPkgNameArch to cover both we need to sort installed_solvables by name and arch.

Otherwise this can lead to problems if multiple architectures of a pkg are installed.

For: https://bugzilla.redhat.com/show_bug.cgi?id=2212838

…g:2212838)

`std::lower_bound` expects that the range it operates on is sorted by
the provided comparator.

`lower_bound()` is used on `installed_solvables` twice, first with
comparator `NameSolvableComparator` and later with
`SolvableCompareAdvisoryPkgNameArch` to cover both we need to sort
`installed_solvables` by name and arch.

Otherwise this can lead to problems if multiple architectures of a pkg
are installed.

For: https://bugzilla.redhat.com/show_bug.cgi?id=2212838
@j-mracek
Copy link
Member

j-mracek commented Aug 8, 2023

May I ask you for test for our CI?

@kontura
Copy link
Contributor Author

kontura commented Aug 22, 2023

May I ask you for test for our CI?

Created: rpm-software-management/ci-dnf-stack#1367

Copy link
Member

@jan-kolarik jan-kolarik left a comment

Choose a reason for hiding this comment

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

LGTM

@jan-kolarik jan-kolarik self-assigned this Aug 28, 2023
@jan-kolarik jan-kolarik merged commit 4b693b1 into rpm-software-management:dnf-4-master Sep 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants