summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 0000000000..1d7f5230a9
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,64 @@
1From 6e62be87a2722fbe531310a1b052c1301bdf06fb Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 27 Jun 2018 16:09:24 +0800
4Subject: [PATCH 2/9] use lnr wrapper instead of looking for --relative option
5 for ln
6
7Remove file manually to avoid the 'File Exists' error when creating
8symlink. This is because the original 'ln' command uses '-f' option.
9
10Upstream-Status: Inappropriate [OE-Specific]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
14---
15 meson.build | 4 ----
16 tools/meson-make-symlink.sh | 3 ++-
17 units/meson-add-wants.sh | 7 ++++++-
18 3 files changed, 8 insertions(+), 6 deletions(-)
19
20diff --git a/meson.build b/meson.build
21index 04331dd41..6d5edcb4e 100644
22--- a/meson.build
23+++ b/meson.build
24@@ -558,10 +558,6 @@ endforeach
25
26 conf.set_quoted('TELINIT', get_option('telinit-path'))
27
28-if run_command('ln', '--relative', '--help').returncode() != 0
29- error('ln does not support --relative (added in coreutils 8.16)')
30-endif
31-
32 ############################################################
33
34 gperf = find_program('gperf')
35diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
36index 501cd43d4..f4e4ac9ac 100755
37--- a/tools/meson-make-symlink.sh
38+++ b/tools/meson-make-symlink.sh
39@@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")"
40 if [ "$(dirname $1)" = . ]; then
41 ln -vfs -T "$1" "${DESTDIR:-}$2"
42 else
43- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
44+ rm -f "${DESTDIR:-}$2"
45+ lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2"
46 fi
47diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
48index 70f7172ae..a42666aac 100755
49--- a/units/meson-add-wants.sh
50+++ b/units/meson-add-wants.sh
51@@ -25,4 +25,9 @@ case "$target" in
52 ;;
53 esac
54
55-ln -vfs --relative "$unitpath" "$dir"
56+if [ -d "$dir" ]; then
57+ rm -f "$dir/$unit"
58+ lnr "$unitpath" "$dir/$unit"
59+else
60+ lnr "$unitpath" "$dir"
61+fi
62--
632.11.0
64