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 comps upgrade to system upgrade, comps improvements #2086

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Feb 25, 2025

We have to check for this otherwise the empty string cannot be converted
to valid group package type.
@kontura kontura force-pushed the system-upgrade-comps branch from b134329 to 835841a Compare February 25, 2025 12:04
This would be problematic when we merge group/environment definitions
from all availables repos. When a repo with some part of a group
definition would be unavailable or disabled an upgrade would clear
contained packages.

This matches dnf4 behavior.
Comment on lines +1237 to +1241
// If we have multiple different actions per group it always ends up as upgrade.
// This is because there are only 3 actions: INSTALL, UPGRADE and REMOVE, any two
// of them mean an UPGRADE.
// (Given that groups are not versioned the UPGRADE action basically means synchronization
// with currently loaded metadata.)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I am thinking if REMOVE + INSTALL should really be the same as UPGRADE, because when run sequentially, dnf removes the packages that were removed from a group. But maybe there is a viewpoint I am not considering? Also, I don't think it is a very frequent use case and I am not sure how feasible would it be to implement a different behavior.

Comment on lines +121 to +124
// Upgrade only userinstalled groups because dependency groups will be handled
// during environments upgrade.
// This is important beucase a group can be removed during environment upgrade
// and it should not be makred for upgrade.
Copy link
Contributor

Choose a reason for hiding this comment

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

So, an installed group won't get any updates if it was removed from an environment. I am not sure if this is a correct approach. I mean, when you have packages that are installed as dependencies, they still do get updates. Why wouldn't that be the same for groups?

Also, is this the change that you mentioned in the tests ("There is a change to dnf4 behavior where packages/groups that are no longer part of a group/environment are no longer upgraded. I am not sure if we want this change.")? Because the note suggests it applies also to packages that were removed from group, but the packages still are upgraded...

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.

system-upgrade doesn't upgrade group and environments
2 participants