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

Remove dnf and yum from protected packages #1926

Conversation

evan-goode
Copy link
Member

For the DNF => DNF5 upgrade path in Fedora 39.

See also rpm-software-management/libdnf#1599.

This change should ideally be merged soon and released in Fedora 37. Versions of DNF 4 older than this change will not be able to replace dnf with dnf5 when upgrading Fedora 37 to Fedora 39. The Fedora documentation strongly urges users to fully update their system before attempting an upgrade to a new Fedora release, but there will surely be a small set of users who disregard the documentation and attempt an upgrade from an old version of DNF4 on Fedora 37 straight to Fedora 39. In my opinion, we should therefore remove the protection soon to minimize the size of this group of users. But this concern should be weighed against the risks of leaving the dnf package unprotected. It could instead be argued that we should wait to merge this change until closer to the Fedora 39 release date.

An alternative approach would be to change the behavior of libdnf such that the replacement of a package due to an Obsoletes would not be considered a removal of a protected package. Currently, it seems that dnf cannot upgrade itself to dnf5 since dnf and yum are protected, even if dnf5 provides and obsoletes dnf and yum. But it may not be worth the effort to make this change in libdnf when it is being replaced by DNF5 soon.

@evan-goode evan-goode force-pushed the evan-goode/unprotect-dnf branch from abb0843 to 0b4f484 Compare May 11, 2023 19:18
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, thank you!

@jan-kolarik jan-kolarik merged commit 352b174 into rpm-software-management:master May 18, 2023
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Jul 17, 2023
As described at the end of this comment:
rpm-software-management/dnf#1926 (comment)

There should be some mechanism for replacing even protected packages,
e.g. to upgrade DNF to DNF 5. Obsoleting a protected package is less
likely to happen accidentally than removing it. But this change does
mean that a protected package could be obsoleted, and then the obsoleter
could be removed, which is perhaps not ideal.

IMO a better, more "declarative" way, might be to disallow any
transaction that would result in a protected package no longer being
provided. But I'm not sure how to do this without modifying libsolv.
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Jul 17, 2023
As described at the end of this comment:
rpm-software-management/dnf#1926 (comment)

There should be some mechanism for replacing even protected packages,
e.g. to upgrade DNF to DNF 5. Obsoleting a protected package is less
likely to happen accidentally than removing it. But this change does
mean that a protected package could be obsoleted, and then the obsoleter
could be removed, which is perhaps not ideal.

IMO a better, more "declarative" way, might be to disallow any
transaction that would result in a protected package no longer being
provided. But I'm not sure how to do this without modifying libsolv.
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Aug 28, 2023
As described at the end of this comment:
rpm-software-management/dnf#1926 (comment)

There should be some mechanism for replacing even protected packages,
e.g. to upgrade DNF to DNF 5. Obsoleting a protected package is less
likely to happen accidentally than removing it. But this change does
mean that a protected package could be obsoleted, and then the obsoleter
could be removed, which is perhaps not ideal.

IMO a better, more "declarative" way, might be to disallow any
transaction that would result in a protected package no longer being
provided. But I'm not sure how to do this without modifying libsolv.
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Aug 28, 2023
As described at the end of this comment:
rpm-software-management/dnf#1926 (comment)

There should be some mechanism for replacing even protected packages,
e.g. to upgrade DNF to DNF 5. Obsoleting a protected package is less
likely to happen accidentally than removing it. But this change does
mean that a protected package could be obsoleted, and then the obsoleter
could be removed, which is perhaps not ideal.

The running kernel is treated as a special case; obsoletes of the
running kernel are still not allowed.

IMO a better, more "declarative" way, might be to disallow any
transaction that would result in a protected package no longer being
provided. But I'm not sure how to do this without modifying libsolv.
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Sep 12, 2023
As described at the end of this comment:
rpm-software-management/dnf#1926 (comment)

There should be some mechanism for replacing even protected packages,
e.g. to upgrade DNF to DNF 5. Obsoleting a protected package is less
likely to happen accidentally than removing it. But this change does
mean that a protected package could be obsoleted, and then the obsoleter
could be removed, which is perhaps not ideal.

The running kernel is treated as a special case; obsoletes of the
running kernel are still not allowed.

IMO a better, more "declarative" way, might be to disallow any
transaction that would result in a protected package no longer being
provided. But I'm not sure how to do this without modifying libsolv.
evan-goode added a commit to rpm-software-management/libdnf that referenced this pull request Sep 19, 2023
As described at the end of this comment:
rpm-software-management/dnf#1926 (comment)

There should be some mechanism for replacing even protected packages,
e.g. to upgrade DNF to DNF 5. Obsoleting a protected package is less
likely to happen accidentally than removing it. But this change does
mean that a protected package could be obsoleted, and then the obsoleter
could be removed, which is perhaps not ideal.

The running kernel is treated as a special case; obsoletes of the
running kernel are still not allowed.

IMO a better, more "declarative" way, might be to disallow any
transaction that would result in a protected package no longer being
provided. But I'm not sure how to do this without modifying libsolv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants