Commit 5dafab27 authored by Marco Trevisan's avatar Marco Trevisan 🎺
Browse files

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.
parent dd2ffb3d
[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@;
......@@ -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')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment