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

Add --minimal option for check-ugrade command #1519

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

j-mracek
Copy link
Contributor

@j-mracek j-mracek commented May 29, 2024

It is required for a feature parity with upgrade command where the option is already available.

Related: https://issues.redhat.com/browse/RHEL-38804

CI: rpm-software-management/ci-dnf-stack#1511

@j-mracek j-mracek added blocked Further work on issue or PR is blocked by something else and removed blocked Further work on issue or PR is blocked by something else labels May 29, 2024
@kontura kontura self-assigned this May 31, 2024
// Last, only include latest upgrades
upgrades_query.filter_latest_evr();
if (minimal) {
// when minimal is requested, keep only the earrliest version
Copy link
Contributor

Choose a reason for hiding this comment

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

Small typo: earrliest -> earliest

@@ -153,8 +176,13 @@ void CheckUpgradeCommand::run() {
std::move(advisories.value()), installed_query, libdnf5::sack::QueryCmp::GTE);
}

// Last, only include latest upgrades
upgrades_query.filter_latest_evr();
if (minimal) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this should be minimal->get_value().
It is also breaking a couple of tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

May I ask you to explain your comment in more details?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is an update for tests - rpm-software-management/ci-dnf-stack#1511

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've got it, the test was really incorrect. The test was for pointer and not for bool value in the pointer of BoolOption. Fixed

Comment on lines 54 to 55
"Reports the lowest versions of packages that fix a bugfix, enhancement or a fix for a security issue "
"(security) on the system.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Both this description and the man page don't mention the newpackage advisory type which is also used.

What about to change it a bit to: Reports the lowest versions of packages that fix advisories of type bugfix, enhancement, security, or newpackage.

Anyway I do like your description much more than the one in upgrade command which is quite ambiguous. Could they be unified? There is even a TODO for it.

@j-mracek j-mracek force-pushed the minimal branch 2 times, most recently from 400faf0 to 9efb114 Compare June 4, 2024 14:01
j-mracek added 2 commits June 5, 2024 11:49
It is required for a feature parity with upgrade command where the
option is already available.

Related: https://issues.redhat.com/browse/RHEL-38804
Additional it provides information about relation to other security options
@kontura
Copy link
Contributor

kontura commented Jun 5, 2024

Great, thank you.

@kontura kontura added this pull request to the merge queue Jun 5, 2024
Merged via the queue into rpm-software-management:main with commit 78101dc Jun 5, 2024
12 of 15 checks passed
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