[27.x backport] install_rpm_containerd: add support for dnf5#1060
Merged
Conversation
- use command -v for detecting dnf instead of the --version - quote repo-IDs to prevent globbing by the shell Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit c47674d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Fedora 41 and up use the new dnf5 as default, which is a rewrite of
the dnf commands with different options;
+ dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
make: *** [Makefile:95: verify] Error 2
script returned exit code 2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3fdf261)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The addrepo command has a bug that causes it to fail if the `.repo` file
contains empty lines, causing it to fail;
dnf config-manager addrepo --from-repofile="https://download.docker.com/linux/fedora/docker-ce.repo"
Error in added repository configuration file. Cannot set repository option "docker#1=
": Option "docker#1" not found
Use a temporary file and strip empty lines as a workaround until the bug
is fixed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f43b3cf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
config-manager addrepofails to add docker repository config rpm-software-management/dnf5#1603install_rpm_containerd: minor cleanup
install_rpm_containerd: add support for dnf5
Fedora 41 and up use the new dnf5 as default, which is a rewrite of
the dnf commands with different options;
install_rpm_containerd: add workaround for dnf5 addrepo bug
The addrepo command has a bug that causes it to fail if the
.repofilecontains empty lines, causing it to fail;
Use a temporary file and strip empty lines as a workaround until the bug
is fixed.