summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-03-18 20:38:49 +0100
committerLubomir Rintel <lkundrak@v3.sk>2018-05-09 12:59:39 +0200
commit6384ad4ee16f31dd103f790bd193c4049d89a6fc (patch)
tree6448fdad7c16dca2e8879aab97e250535960e7f4 /meson.build
parent6aac441f1ce9f74ccb9dd2d97d3330be3eec0cef (diff)
downloadNetworkManager-6384ad4ee16f31dd103f790bd193c4049d89a6fc.tar.gz
build: qualify plugin dir name with a version stringlr/version-dir
This makes package updates more robust, avoiding in-place replaces of the plugins. Previously, if an upgrade transaction was terminated, NetworkManager library could end up being of a different version than the plugins. If the user was unfortunate enough to connect using a connection that required a plugin (say, Wi-Fi), he would be left without a network connection making it somewhat inconvenient to recover from the botched upgrade. This makes the whole situation a little bit less sad.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 8 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index dc1524aa0d..480c56ff88 100644
--- a/meson.build
+++ b/meson.build
@@ -25,6 +25,12 @@ nm_id_prefix = 'NM'
nm_gir_version = '1.0'
+# Distribution version string
+dist_version = get_option('dist_version')
+if dist_version == ''
+ dist_version = nm_version
+endif
+
nm_prefix = get_option('prefix')
nm_bindir = join_paths(nm_prefix, get_option('bindir'))
nm_datadir = join_paths(nm_prefix, get_option('datadir'))
@@ -45,7 +51,7 @@ nm_pkgincludedir = join_paths(nm_includedir, nm_name)
nm_pkglibdir = join_paths(nm_prefix, 'lib', nm_name)
nm_pkgrundir = join_paths(nm_runstatedir, nm_name)
nm_pkgstatedir = join_paths(nm_localstatedir, nm_name)
-nm_plugindir = join_paths(nm_libdir, nm_name)
+nm_plugindir = join_paths(nm_libdir, nm_name, dist_version)
libnm_name = 'libnm'
@@ -259,11 +265,7 @@ if config_plugins_default == ''
endif
config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_PLUGINS', config_plugins_default)
-# Distribution version string
-dist_version = get_option('dist_version')
-if dist_version != ''
- config_h.set_quoted('NM_DIST_VERSION', dist_version)
-endif
+config_h.set_quoted('NM_DIST_VERSION', dist_version)
enable_wifi = get_option('wifi')
config_h.set10('WITH_WIFI', enable_wifi)