1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-13 12:58:20 +03:00

xdg-autostart: downgrade warning for missing executables

On a system with a shared home directory, I'm getting a bunch of warnings:

systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.signal.Signal.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/im.riot.Riot.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/libexec/gnome-tweak-tool-lid-inhibitor' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/ignore-lid-switch-tweak.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop: not generating unit, error parsing Exec= line: No such file or directory

This isn't really a problem. Let's just print an info message.

(cherry picked from commit ed739145fba45d10d884661422d8779f88032749)
(cherry picked from commit fc31abab9623a8681179d7337598177c1a127d88)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-11-07 17:50:51 +01:00 committed by Luca Boccassi
parent 000b9e7cce
commit 20a7677adf

View File

@ -558,7 +558,10 @@ int xdg_autostart_service_generate_unit(
r = xdg_autostart_format_exec_start(service->exec_string, &exec_start);
if (r < 0) {
log_warning_errno(r, "%s: not generating unit, error parsing Exec= line: %m", service->path);
log_full_errno(r == -ENOENT ? LOG_INFO : LOG_WARNING, r,
r == -ENOENT ? "%s: not generating unit, executable specified in Exec= does not exist."
: "%s: not generating unit, error parsing Exec= line: %m",
service->path);
return 0;
}