-
Notifications
You must be signed in to change notification settings - Fork 546
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 Backport for installonlypkgs to tdnf for Mariner 2.0 #7056
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested these changes. They respect installonly_limit but have different behavior then dnf. The patched tdnf removes the "rpm installed longest ago" while dnf removes the "oldest versioned rpm" installed. In both cases however, only 3 kernels are ever installed.
Dnf behavior:
$ rpm -qa kernel
5.15.137.1-1
5.15.138.1-1
5.15.131.1-1
$ dnf install -y kernel-5.15.136.1-1
#5.15.131.1-1 was removed.
$ rpm -qa kernel
5.15.137.1-1
5.15.138.1-1
5.15.136.1-1
tdnf behavior:
$ rpm -qa kernel
5.15.137.1-1
5.15.138.1-1
5.15.131.1-1
$ tdnf install -y kernel-5.15.136.1-1
# 5.15.137.1-1 was removed.
$ rpm -qa kernel
5.15.138.1-1
5.15.131.1-1
5.15.136.1-1
There is an upstream request for parity with dnf here: vmware/tdnf#460 |
gpgcheck=1 | ||
installonly_limit=3 | ||
+installonlypkgs=kernel kernel-hci kernel-mos kernel-mshv kernel-uvm kernel-uvm-cvm kernel-azure | ||
clean_requirements_on_remove=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this off by default? I think it's enabled by default for DNF, per here:
The clean_requirements_on_remove switch is on by default in DNF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it would be good to stay consistent with how tdnf has been working in Mariner, regardless of going with yum vs. dnf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default this is off in tdnf and we have not changed it, see here for the upstream file. This would be a reasonable change in behavior that we may not want for 2.0. We may be able to investigate for 3.0 as it could potentially cause some splash by turning it on now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, lgtm.
Co-authored-by: Sam Meluch <sam.meluch@microsoft.com>
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-static
subpackages, etc.) have had theirRelease
tag incremented../cgmanifest.json
,./toolkit/scripts/toolchain/cgmanifest.json
,.github/workflows/cgmanifest.json
)./SPECS/LICENSES-AND-NOTICES/data/licenses.json
,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md
,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON
)*.signatures.json
filessudo make go-tidy-all
andsudo make go-test-coverage
passSummary
What does the PR accomplish, why was it needed?
Backport patch for installonlypkgs functionality for tdnf in Mariner 2.0 to allow for kernel modules to be maintained post
tdnf upgrade
.Change Log
Does this affect the toolchain?
YES
Test Methodology