diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-15 23:32:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-16 11:28:17 +0000 |
commit | d290013d9137d80157a4db4a361b3e9bb81ff56f (patch) | |
tree | 2febd805f8b3ea1d85900e283ae0bb18522ca5b7 /meta/recipes-support/vim | |
parent | 4d73ac2bd6a86e4bda70e26c7a7265bd6fbea7bc (diff) | |
download | poky-d290013d9137d80157a4db4a361b3e9bb81ff56f.tar.gz |
vim: Fix a race over creation of the desktop files
The LINGUAS file can be written by two different Makefile targets
and if they race, the desktop file contents isn't deterministic.
Fix the makfile to avoid this.
(From OE-Core rev: 416bc7b697764075fbf73683cd8bddf36d839244)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/vim')
-rw-r--r-- | meta/recipes-support/vim/files/racefix.patch | 33 | ||||
-rw-r--r-- | meta/recipes-support/vim/vim.inc | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-support/vim/files/racefix.patch b/meta/recipes-support/vim/files/racefix.patch new file mode 100644 index 0000000000..48dca44cad --- /dev/null +++ b/meta/recipes-support/vim/files/racefix.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | The creation of the LINGUAS file is duplicated for each desktop file | ||
2 | which can lead the commands to race against each other. Rework | ||
3 | the makefile to avoid this as the expense of leaving the file on disk. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | RP 2021/2/15 | ||
7 | |||
8 | Index: git/src/po/Makefile | ||
9 | =================================================================== | ||
10 | --- git.orig/src/po/Makefile | ||
11 | +++ git/src/po/Makefile | ||
12 | @@ -165,17 +165,16 @@ $(PACKAGE).pot: ../*.c ../if_perl.xs ../ | ||
13 | po/gvim.desktop.in po/vim.desktop.in | ||
14 | mv -f ../$(PACKAGE).po $(PACKAGE).pot | ||
15 | |||
16 | -vim.desktop: vim.desktop.in $(POFILES) | ||
17 | +LINGUAS: | ||
18 | echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS | ||
19 | + | ||
20 | +vim.desktop: vim.desktop.in $(POFILES) LINGUAS | ||
21 | $(MSGFMT) --desktop -d . --template vim.desktop.in -o tmp_vim.desktop | ||
22 | - rm -f LINGUAS | ||
23 | if command -v desktop-file-validate; then desktop-file-validate tmp_vim.desktop; fi | ||
24 | mv tmp_vim.desktop vim.desktop | ||
25 | |||
26 | -gvim.desktop: gvim.desktop.in $(POFILES) | ||
27 | - echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS | ||
28 | +gvim.desktop: gvim.desktop.in $(POFILES) LINGUAS | ||
29 | $(MSGFMT) --desktop -d . --template gvim.desktop.in -o tmp_gvim.desktop | ||
30 | - rm -f LINGUAS | ||
31 | if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi | ||
32 | mv tmp_gvim.desktop gvim.desktop | ||
33 | |||
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc index 1ea40e5e7f..d57f784da5 100644 --- a/meta/recipes-support/vim/vim.inc +++ b/meta/recipes-support/vim/vim.inc | |||
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/vim/vim.git \ | |||
12 | file://vim-add-knob-whether-elf.h-are-checked.patch \ | 12 | file://vim-add-knob-whether-elf.h-are-checked.patch \ |
13 | file://0001-src-Makefile-improve-reproducibility.patch \ | 13 | file://0001-src-Makefile-improve-reproducibility.patch \ |
14 | file://no-path-adjust.patch \ | 14 | file://no-path-adjust.patch \ |
15 | file://racefix.patch \ | ||
15 | " | 16 | " |
16 | SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44" | 17 | SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44" |
17 | 18 | ||