diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2016-02-19 00:54:43 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:32:58 +0000 |
| commit | 033db243ae01530cdbc65bd2a9cf7f9319e42a2c (patch) | |
| tree | 752e5dc4a9f09699718b63da21c179932f700e9f | |
| parent | 9af773f1c6912b008ecdb460c9e93ea9476104b8 (diff) | |
| download | poky-033db243ae01530cdbc65bd2a9cf7f9319e42a2c.tar.gz | |
btrfs-tools: fix symlink creation multiple times
The rule to create symlink in Makefile caused parallel issue:
$ make -j 40 DESTDIR=/image install BUILD_VERBOSE=1
...
1 [LN] libbtrfs.so.0
2 [LN] libbtrfs.so
3 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0
4 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0
5 ln -s -f libbtrfs.so.0.1 libbtrfs.so
6 ln -s -f libbtrfs.so.0.1 libbtrfs.so
...
It failed occasionally:
...
|symlinkat: couldn't stat 'git/libbtrfs.so' even though symlink
creation succeeded (No such file or directory).
|ln: failed to create symbolic link 'libbtrfs.so': No such file or directory
...
(From OE-Core rev: 9409c7e7202fe96b55f44a133ba68690bb192da2)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch | 46 | ||||
| -rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch new file mode 100644 index 0000000000..a945496399 --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 05ab78e9183575e38f342e05a056cb7bcd1e52e1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Thu, 18 Feb 2016 20:41:28 -0500 | ||
| 4 | Subject: [PATCH] btrfs-progs: fix symlink creation multiple times | ||
| 5 | |||
| 6 | The rule to create symlink in Makefile caused parallel issue: | ||
| 7 | $ make -j 40 DESTDIR=/image install BUILD_VERBOSE=1 | ||
| 8 | ... | ||
| 9 | 1 [LN] libbtrfs.so.0 | ||
| 10 | 2 [LN] libbtrfs.so | ||
| 11 | 3 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0 | ||
| 12 | 4 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0 | ||
| 13 | 5 ln -s -f libbtrfs.so.0.1 libbtrfs.so | ||
| 14 | 6 ln -s -f libbtrfs.so.0.1 libbtrfs.so | ||
| 15 | ... | ||
| 16 | |||
| 17 | It failed occasionally: | ||
| 18 | ... | ||
| 19 | |symlinkat: couldn't stat 'git/libbtrfs.so' even though symlink | ||
| 20 | creation succeeded (No such file or directory). | ||
| 21 | |ln: failed to create symbolic link 'libbtrfs.so': No such file or directory | ||
| 22 | ... | ||
| 23 | |||
| 24 | Upstream-Status: Submitted [linux-btrfs@vger.kernel.org] | ||
| 25 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 26 | --- | ||
| 27 | Makefile.in | 3 +-- | ||
| 28 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/Makefile.in b/Makefile.in | ||
| 31 | index 1f4002e..16eeaf9 100644 | ||
| 32 | --- a/Makefile.in | ||
| 33 | +++ b/Makefile.in | ||
| 34 | @@ -236,8 +236,7 @@ $(libs_static): $(libbtrfs_objects) | ||
| 35 | |||
| 36 | $(lib_links): | ||
| 37 | @echo " [LN] $@" | ||
| 38 | - $(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so.0 | ||
| 39 | - $(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so | ||
| 40 | + $(Q)$(LN_S) -f libbtrfs.so.0.1 $@ | ||
| 41 | |||
| 42 | # keep intermediate files from the below implicit rules around | ||
| 43 | .PRECIOUS: $(addsuffix .o,$(progs)) | ||
| 44 | -- | ||
| 45 | 1.9.1 | ||
| 46 | |||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb index 5ca9bb0800..9b68edc8f5 100644 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb | |||
| @@ -15,6 +15,7 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl" | |||
| 15 | SRCREV = "21258fab2caeade405a15ba932d373b364aa6e8c" | 15 | SRCREV = "21258fab2caeade405a15ba932d373b364aa6e8c" |
| 16 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ | 16 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ |
| 17 | file://fix-parallel.patch \ | 17 | file://fix-parallel.patch \ |
| 18 | file://fix-symlink-creation-multiple-times.patch \ | ||
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | inherit autotools-brokensep pkgconfig | 21 | inherit autotools-brokensep pkgconfig |
