]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: use status-unit-format-default=name in developer mode 23683/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 9 Jun 2022 18:33:29 +0000 (20:33 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Jun 2022 11:51:17 +0000 (13:51 +0200)
I think developers are particularly unlikely to find the descriptions
useful, and would benefit from being able to copy&paste unit names.
Let's make this choice automatically.

meson.build
meson_options.txt

index 630f84d702b42d0ef678f1720d3b759df05f7695..d6391d45a25c94441f2618d0616bcb59849e234a 100644 (file)
@@ -226,6 +226,9 @@ endif
 
 memory_accounting_default = get_option('memory-accounting-default')
 status_unit_format_default = get_option('status-unit-format-default')
+if status_unit_format_default == 'auto'
+        status_unit_format_default = conf.get('BUILD_MODE_DEVELOPER') == 1 ? 'name' : 'description'
+endif
 
 conf.set_quoted('BINFMT_DIR',                                 binfmtdir)
 conf.set_quoted('BOOTLIBDIR',                                 bootlibdir)
index 3bb25c6f763f0e93bb17a8d7e7072e08e8b876df..267c8293686734690559aa3663589f1abaa5ac20 100644 (file)
@@ -214,7 +214,7 @@ option('extra-net-naming-schemes', type : 'string',
 option('default-net-naming-scheme', type : 'string', value : 'latest',
        description : 'default net.naming-scheme= value')
 option('status-unit-format-default', type : 'combo',
-       choices : ['description', 'name', 'combined'],
+       choices : ['auto', 'description', 'name', 'combined'],
        description : 'use unit name or description in messages by default')
 option('time-epoch', type : 'integer', value : '-1',
        description : 'time epoch for time clients')