Skip to content

Commit

Permalink
update error message when running on a bootc/ostree system
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrero committed Jul 16, 2024
1 parent 15a6342 commit 62afc72
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dnf/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,11 @@ 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():
_container_msg = _("""
*** This system is managed with ostree. Changes to the system
*** made with dnf will be lost with the next ostree-based update.
*** If you do not want to lose these changes, use 'rpm-ostree'.
_bootc_host_msg = _("""
*** error: system is configured to be read-only; for more
*** information run `bootc status` or `ostree admin status`.
""")
logger.info(_container_msg)
logger.info(_bootc_host_msg)
raise CliError(_("Operation aborted."))

if self._promptWanted():
Expand Down

0 comments on commit 62afc72

Please sign in to comment.