[gnome-session] meson: Generate *.session.conf for all the sessions with required components
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] meson: Generate *.session.conf for all the sessions with required components
- Date: Mon, 31 Aug 2020 18:26:40 +0000 (UTC)
commit 5dafab27bb9ce76fb9e12e45624c9d01f8e33cb5
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Aug 31 20:20:04 2020 +0200
meson: Generate *.session.conf for all the sessions with required components
As per previous commit we fill the gnome-session's session.conf based on
a list of required components, we can also avoid hardcoding things even
more, and generate config files for all the configured desktop sessions
with required components.
data/gnome.session.desktop.in.in | 2 +-
data/meson.build | 29 ++++++++++++++++-------------
2 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/data/gnome.session.desktop.in.in b/data/gnome.session.desktop.in.in
index c72e0ba9..b3ea9fcf 100644
--- a/data/gnome.session.desktop.in.in
+++ b/data/gnome.session.desktop.in.in
@@ -1,4 +1,4 @@
[GNOME Session]
Name=GNOME
-# Must be in sync with gnome-session@gnome.target.d/session.conf drop-in
+# Must be in sync with gnome-session@gnome.target.d/gnome.session.conf drop-in
RequiredComponents=@required_components@;
diff --git a/data/meson.build b/data/meson.build
index 99f05bd2..e02b80d3 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -162,20 +162,23 @@ if enable_systemd_session
install_dir : join_paths(systemd_userunitdir, 'gnome-launched-.scope.d')
)
- gnome_session_wanted_targets = []
- foreach component: required_components[desktop_plain]
- gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
- endforeach
+ foreach session, req_components: required_components
+ wanted_targets = []
+ foreach component: req_components
+ wanted_targets += 'Wants=@0@.target'.format(component)
+ endforeach
- configure_file(
- input: 'gnome.session.conf.in',
- output: 'session.conf',
- configuration: {
- 'requires_component': shell_component[desktop_plain],
- 'wants_required_components': '\n'.join(gnome_session_wanted_targets),
- },
- install_dir: systemd_userunitdir / 'gnome-session@gnome.target.d',
- )
+ configure_file(
+ input: session + '.session.conf.in',
+ output: session + '.session.conf',
+ configuration: {
+ 'requires_component': shell_component[session],
+ 'wants_required_components': '\n'.join(wanted_targets),
+ },
+ install_dir: systemd_userunitdir / 'gnome-session@@0@.target.d'.format(
+ session),
+ )
+ endforeach
endif
data = files('hardware-compatibility')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]