From d301552fdafa907c92ac1b9660958f8c5c244896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 10 Oct 2024 10:57:48 +0200 Subject: [PATCH] Allow --downloadonly on read-only bootc system "dnf install --downloadonly" failed on read-only bootc system despite not running the transaction. The downloaded packages are stored under writable /var or to a directory explicitly choosen by a user. This patch suppresses the bootc read-only bailout if --downloadonly option is used. https://issues.redhat.com/browse/RHEL-61745 --- dnf/cli/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py index 008262ea0b..d3844df344 100644 --- a/dnf/cli/cli.py +++ b/dnf/cli/cli.py @@ -215,7 +215,8 @@ def do_transaction(self, display=()): logger.info(_("{prog} will only download packages, install gpg keys, and check the " "transaction.").format(prog=dnf.util.MAIN_PROG_UPPER)) if dnf.util._is_bootc_host() and \ - os.path.realpath(self.conf.installroot) == "/": + os.path.realpath(self.conf.installroot) == "/" and \ + not self.conf.downloadonly: _bootc_host_msg = _(""" *** Error: system is configured to be read-only; for more *** information run `bootc --help`.