Skip to content

Commit

Permalink
system-upgrade: Handle _execute errors
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-goode committed Feb 27, 2024
1 parent 4e829bd commit 3b12b42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dnf5/commands/offline/offline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ void OfflineExecuteCommand::run() {

auto transaction = goal->resolve();
if (transaction.get_problems() != libdnf5::GoalProblem::NO_PROBLEM) {
std::cerr << "Failed to resolve transaction. This indicates some bigger problem, since the offline transaction "
"was already successfully resolved before. Was the cache at "
<< datadir << " modified?" << std::endl;
throw libdnf5::cli::GoalResolveError(transaction);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Type=oneshot
# Upgrade output goes to journal and on-screen.
StandardOutput=journal+console
ExecStart=/usr/bin/dnf5 offline _execute
FailureAction=reboot

[Install]
WantedBy=system-update.target

0 comments on commit 3b12b42

Please sign in to comment.