xdg autostart Lower most info messages to debug level
This commit is contained in:
parent
50f14caa19
commit
35b09787b3
@ -0,0 +1,76 @@
|
||||
From 47c1db6730b8a81b01e8505a648624fa6ad0bbd7 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Mon, 12 Oct 2020 11:02:26 +0200
|
||||
Subject: [PATCH] xdg-autostart: Lower most info messages to debug level
|
||||
|
||||
It is expected for numerous autostart files to not be convertible to
|
||||
corresponding units. The information is only useful for someone
|
||||
debugging why a file might not be started, but it is not generally
|
||||
useful for users in most situations.
|
||||
|
||||
As such, lower the warnings. Anyone wondering why an application is not
|
||||
started will easily notice that the unit is not generated. From there it
|
||||
will be somewhat harder to figure out why, but the overall trade-off is
|
||||
still improved.
|
||||
|
||||
Fixes: #17305
|
||||
---
|
||||
src/xdg-autostart-generator/xdg-autostart-service.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/xdg-autostart-generator/xdg-autostart-service.c b/src/xdg-autostart-generator/xdg-autostart-service.c
|
||||
index c6f39f2..6324c50 100644
|
||||
--- a/src/xdg-autostart-generator/xdg-autostart-service.c
|
||||
+++ b/src/xdg-autostart-generator/xdg-autostart-service.c
|
||||
@@ -483,7 +483,7 @@ static int xdg_autostart_generate_desktop_condition(
|
||||
|
||||
r = find_binary(test_binary, &gnome_autostart_condition_path);
|
||||
if (r < 0) {
|
||||
- log_full_errno(r == -ENOENT ? LOG_INFO : LOG_WARNING, r,
|
||||
+ log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r,
|
||||
"%s not found: %m", test_binary);
|
||||
fprintf(f, "# ExecCondition using %s skipped due to missing binary.\n", test_binary);
|
||||
return r;
|
||||
@@ -514,18 +514,18 @@ int xdg_autostart_service_generate_unit(
|
||||
|
||||
/* Nothing to do for hidden services. */
|
||||
if (service->hidden) {
|
||||
- log_info("Not generating service for XDG autostart %s, it is hidden.", service->name);
|
||||
+ log_debug("Not generating service for XDG autostart %s, it is hidden.", service->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (service->systemd_skip) {
|
||||
- log_info("Not generating service for XDG autostart %s, should be skipped by generator.", service->name);
|
||||
+ log_debug("Not generating service for XDG autostart %s, should be skipped by generator.", service->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Nothing to do if type is not Application. */
|
||||
if (!streq_ptr(service->type, "Application")) {
|
||||
- log_info("Not generating service for XDG autostart %s, only Type=Application is supported.", service->name);
|
||||
+ log_debug("Not generating service for XDG autostart %s, only Type=Application is supported.", service->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ int xdg_autostart_service_generate_unit(
|
||||
if (service->try_exec) {
|
||||
r = find_binary(service->try_exec, NULL);
|
||||
if (r < 0) {
|
||||
- log_full_errno(r == -ENOENT ? LOG_INFO : LOG_WARNING, r,
|
||||
+ log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r,
|
||||
"Not generating service for XDG autostart %s, could not find TryExec= binary %s: %m",
|
||||
service->name, service->try_exec);
|
||||
return 0;
|
||||
@@ -558,7 +558,7 @@ int xdg_autostart_service_generate_unit(
|
||||
|
||||
if (service->gnome_autostart_phase) {
|
||||
/* There is no explicit value for the "Application" phase. */
|
||||
- log_info("Not generating service for XDG autostart %s, startup phases are not supported.",
|
||||
+ log_debug("Not generating service for XDG autostart %s, startup phases are not supported.",
|
||||
service->name);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
10
systemd.spec
10
systemd.spec
@ -20,7 +20,7 @@
|
||||
Name: systemd
|
||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||
Version: 246
|
||||
Release: 12
|
||||
Release: 13
|
||||
License: MIT and LGPLv2+ and GPLv2+
|
||||
Summary: System and Service Manager
|
||||
|
||||
@ -70,6 +70,8 @@ Patch0018: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
|
||||
Patch0019: core-serialize-u-pids-until-the-processes-have-been-.patch
|
||||
Patch0020: scope-on-unified-make-sure-to-unwatch-all-PIDs-once-.patch
|
||||
|
||||
Patch6000: backport-xdg-autostart-Lower-most-info-messages-to-debug-leve.patch
|
||||
|
||||
BuildRequires: gcc, gcc-c++
|
||||
BuildRequires: libcap-devel, libmount-devel, pam-devel, libselinux-devel
|
||||
BuildRequires: audit-libs-devel, cryptsetup-devel, dbus-devel, libacl-devel
|
||||
@ -1484,6 +1486,12 @@ fi
|
||||
%exclude /usr/share/man/man3/*
|
||||
|
||||
%changelog
|
||||
* Sat Feb 27 2021 shenyangyang <shenyangyang4@huawei.com> - 246-13
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:xdg autostart Lower most info messages to debug level
|
||||
|
||||
* Sat Feb 27 2021 gaoyi <ymuemc@163.com> - 246-12
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user