From e9b92cbf871bbcc382cdd93acc6eafb77957463d Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Mon, 17 Jan 2022 12:20:37 +0100
Subject: [PATCH] fix(system-upgrades): Fix bootloop after system upgrade

This patch resolves the issues with the bootloop caused by the wrong
implementation of `needs-restarting`, which returns a list of apps, that
needs to be restarted. However, without the `--reboothint` parameter,
it'll fail to indicate the reboot requirement using an exit code.

Therefore the loop was always true and resulted in a reboot loop.
---
 infrastructure/system-upgrades/fedora.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure/system-upgrades/fedora.yaml b/infrastructure/system-upgrades/fedora.yaml
index 28593e454..bc18855c2 100644
--- a/infrastructure/system-upgrades/fedora.yaml
+++ b/infrastructure/system-upgrades/fedora.yaml
@@ -12,7 +12,7 @@ stringData:
     set -x
     dnf install -y dnf-utils
     dnf upgrade -y --best
-    if needs-restarting; then
+    if ! dnf needs-restarting --reboothint; then
       systemctl reboot
     fi
 ---
-- 
GitLab