Skip to content

Commit

Permalink
Remove preference for dnf4 in mkosi-initrd
Browse files Browse the repository at this point in the history
This effectively reverts 7b92904 as DNF 5 is now the new default
in the most recent Fedora release.
  • Loading branch information
septatrix committed Jan 4, 2025
1 parent 91bf2db commit ab457e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mkosi/initrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from mkosi.config import DocFormat, OutputFormat
from mkosi.documentation import show_docs
from mkosi.log import log_notice, log_setup
from mkosi.run import find_binary, run, uncaught_exception_handler
from mkosi.run import run, uncaught_exception_handler
from mkosi.sandbox import __version__, umask
from mkosi.tree import copy_tree
from mkosi.types import PathString
Expand Down Expand Up @@ -200,13 +200,10 @@ def main() -> None:
if Path("/etc/kernel/cmdline").exists():
cmdline += ["--kernel-command-line", Path("/etc/kernel/cmdline").read_text()]

# Prefer dnf as dnf5 has not yet officially replaced it and there's a much bigger chance that there
# will be a populated dnf cache directory.
run(
cmdline,
stdin=sys.stdin,
stdout=sys.stdout,
env={"MKOSI_DNF": dnf.name} if (dnf := find_binary("dnf", "dnf5")) else {},
)

if args.output_dir:
Expand Down

0 comments on commit ab457e4

Please sign in to comment.