From 7d690a0e040fcadb7dc740efc0596c7c43ebe3cf Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Tue, 27 Feb 2024 20:08:32 +0000 Subject: [PATCH] system-upgrade: Add warning to `dnf5 offline _execute` Addresses https://github.com/rpm-software-management/dnf-plugins-core/issues/512 --- dnf5/commands/offline/offline.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dnf5/commands/offline/offline.cpp b/dnf5/commands/offline/offline.cpp index 73a1cbfbf..94749dff2 100644 --- a/dnf5/commands/offline/offline.cpp +++ b/dnf5/commands/offline/offline.cpp @@ -377,6 +377,10 @@ void OfflineExecuteCommand::run() { log_status("Starting offline transaction. This will take a while.", libdnf5::offline::OFFLINE_STARTED_ID); + std::cout << "Warning: the `_execute` command is for internal use only and is not intended to be run directly by " + "the user. To initiate the system upgrade/offline transaction, you should run `dnf5 offline reboot`." + << std::endl; + if (!std::filesystem::is_symlink(get_magic_symlink())) { throw libdnf5::cli::CommandExitError(0, M_("Trigger file does not exist. Exiting.")); }