Skip to content

Commit

Permalink
Allow --downloadonly on read-only bootc system
Browse files Browse the repository at this point in the history
Upstream commit: 8d888d2

"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
  • Loading branch information
ppisar authored and jan-kolarik committed Oct 16, 2024
1 parent ea2d17c commit fdeb208
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dnf/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit fdeb208

Please sign in to comment.