[gnome-session] meson: unconditionally copy session file
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] meson: unconditionally copy session file
- Date: Mon, 8 Jan 2018 21:54:54 +0000 (UTC)
commit 9b37ffc6b82580f5213c2ea7e96b398ff45fa722
Author: Ray Strode <rstrode redhat com>
Date: Mon Jan 8 16:39:19 2018 -0500
meson: unconditionally copy session file
gnome.desktop is installed in two places, but only if
DESTDIR is unset..
This commit makes it always happen.
https://bugzilla.gnome.org/show_bug.cgi?id=792207
meson_post_install.py | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/meson_post_install.py b/meson_post_install.py
index 54361bf..e2e352c 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -5,17 +5,22 @@ import shutil
import subprocess
import sys
+if os.environ.get('DESTDIR'):
+ install_root = os.environ.get('DESTDIR') + os.path.abspath(sys.argv[1])
+else:
+ install_root = sys.argv[1]
+
if not os.environ.get('DESTDIR'):
- schemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
+ schemadir = os.path.join(install_root, 'glib-2.0', 'schemas')
print('Compile gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
- # FIXME: this is due to unable to copy a generated target file:
- # https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
- dst_dir = os.path.join(sys.argv[1], 'wayland-sessions')
- if not os.path.exists(dst_dir):
- os.makedirs(dst_dir)
+# FIXME: this is due to unable to copy a generated target file:
+# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
+dst_dir = os.path.join(install_root, 'wayland-sessions')
+if not os.path.exists(dst_dir):
+ os.makedirs(dst_dir)
- src = os.path.join(sys.argv[1], 'xsessions', 'gnome.desktop')
- dst = os.path.join(dst_dir, 'gnome.desktop')
- shutil.copyfile(src, dst)
+src = os.path.join(install_root, 'xsessions', 'gnome.desktop')
+dst = os.path.join(dst_dir, 'gnome.desktop')
+shutil.copyfile(src, dst)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]