Skip to content

Commit bb8bd71

Browse files
committed
Added more programs to check
1 parent 874c5b8 commit bb8bd71

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

atomic-update

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ from shlex import quote
2828
import xml.etree.ElementTree as ET
2929

3030
# Constants
31-
VERSION = "0.1.15"
31+
VERSION = "0.1.16"
3232
ZYPPER_PID_FILE = "/run/zypp.pid"
3333
VALID_CMD = ["dup", "run", "rollback"]
3434
VALID_OPT = ["--reboot", "--apply", "--shell", "--continue", "--no-verify", \
@@ -51,6 +51,9 @@ CHK_PROGRAMS = [
5151
"gdm",
5252
"gnome-shell",
5353
"gnome-control-center",
54+
"lightdm",
55+
"Hyprland",
56+
# Note: KDE and XFCE does not support querying version without user's env vars!
5457
# TODO: add the display manager, graphical shell, and settings app binary for other DE/WMs
5558
]
5659

@@ -124,9 +127,12 @@ def verify_programs(TMP_MOUNT_DIR):
124127
programs = REQUIRED_DEP + CHK_PROGRAMS
125128
logging.debug(f"Verifying programs: {', '.join(programs)}")
126129
for program in programs:
130+
env_str = ""
131+
if program == "Hyprland":
132+
env_str = "XDG_RUNTIME_DIR="
127133
version_str = "-version" if program in ["Xorg", "Xwayland"] else "--version"
128134
command = f"chroot {TMP_MOUNT_DIR} bash -c '" \
129-
f"command -v {program} || exit 0 && sudo -u nobody {program} {version_str}" \
135+
f"command -v {program} || exit 0 && sudo -u nobody {env_str} {program} {version_str}" \
130136
f"' > /dev/null 2>&1"
131137
out, ret = shell_exec(command)
132138
if ret != 0:

0 commit comments

Comments
 (0)