Skip to content

Commit 2ac82f0

Browse files
committed
rpm: skip systemctl daemon-reload if systemd is not running
Skip it in chroot or a container to not fail the RPM transaction. While RPM says it's "non-crtitical error in the %post scriptlet", it does consider RPM transaction as failed in the end. Interestingly, that happens only on Fedora 43, earlier versions actually do treat it as non-critical and consider RPM transaction successful. Anyway, adjust to not fail the scriptlet and don't worry if the error should be considered fatal or not. QubesOS/qubes-issues#10102
1 parent 06fd5a0 commit 2ac82f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rpm_spec/core-agent.spec.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ then
13041304
changed=true
13051305
fi
13061306

1307-
if [ "x$changed" != "x" ]
1307+
if [ "x$changed" != "x" ] && [ -e /run/systemd/system ]
13081308
then
13091309
systemctl daemon-reload
13101310
fi
@@ -1334,7 +1334,7 @@ then
13341334
changed=true
13351335
fi
13361336

1337-
if [ "x$changed" != "x" ]
1337+
if [ "x$changed" != "x" ] && [ -e /run/systemd/system ]
13381338
then
13391339
systemctl daemon-reload
13401340
fi

0 commit comments

Comments
 (0)