[epiphany] Use /etc/os-release to set distributor name
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Use /etc/os-release to set distributor name
- Date: Thu, 20 Dec 2018 16:03:14 +0000 (UTC)
commit 554a375e8a90d9fb0cffb10d3248b2a05767b456
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Wed Dec 19 14:07:38 2018 +0100
Use /etc/os-release to set distributor name
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/586
meson.build | 9 ++++++++-
meson_options.txt | 6 ------
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 48b5505bb..29e266b27 100644
--- a/meson.build
+++ b/meson.build
@@ -8,6 +8,13 @@ project('epiphany', 'c',
gnome = import('gnome')
i18n = import('i18n')
+r = run_command('grep', '-Po', '^NAME=\K.*', '/etc/os-release')
+if r.returncode() == 0
+ distributor_name = r.stdout().strip()
+else
+ distributor_name = 'GNOME Web'
+endif
+
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir'))
@@ -24,7 +31,7 @@ iso_codes_prefix = iso_codes.get_pkgconfig_variable('prefix')
conf = configuration_data()
conf.set_quoted('BUILD_ROOT', meson.build_root())
-conf.set_quoted('DISTRIBUTOR_NAME', get_option('distributor_name'))
+conf.set_quoted('DISTRIBUTOR_NAME', distributor_name)
conf.set_quoted('EPHY_WEB_EXTENSIONS_DIR', webextensionsdir)
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('ISO_CODES_PREFIX', iso_codes_prefix)
diff --git a/meson_options.txt b/meson_options.txt
index f81ea8850..4a61f9597 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,12 +4,6 @@ option('developer_mode',
description: 'Enable developer mode'
)
-option('distributor_name',
- type: 'string',
- value: 'GNOME Web',
- description: 'Distributor name displayed on process crash page'
-)
-
option('tech_preview',
type: 'boolean',
value: false,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]