summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-15 23:32:04 +0000
committerAnuj Mittal <anuj.mittal@intel.com>2021-02-18 12:01:27 +0800
commit29286073251847eb9931e232b8ff5e4a71f5de5f (patch)
tree333f13832d444b8e6bb102a9d58128654a987b98
parentd1ba11457ebfdbdc0b717b6c5798bb9930e71c88 (diff)
downloadopenembedded-core-29286073251847eb9931e232b8ff5e4a71f5de5f.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 416bc7b697764075fbf73683cd8bddf36d839244) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/recipes-support/vim/files/racefix.patch33
-rw-r--r--meta/recipes-support/vim/vim.inc1
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 @@
+The creation of the LINGUAS file is duplicated for each desktop file
+which can lead the commands to race against each other. Rework
+the makefile to avoid this as the expense of leaving the file on disk.
+
+Upstream-Status: Pending
+RP 2021/2/15
+
+Index: git/src/po/Makefile
+===================================================================
+--- git.orig/src/po/Makefile
++++ git/src/po/Makefile
+@@ -165,17 +165,16 @@ $(PACKAGE).pot: ../*.c ../if_perl.xs ../
+ po/gvim.desktop.in po/vim.desktop.in
+ mv -f ../$(PACKAGE).po $(PACKAGE).pot
+
+-vim.desktop: vim.desktop.in $(POFILES)
++LINGUAS:
+ echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
++
++vim.desktop: vim.desktop.in $(POFILES) LINGUAS
+ $(MSGFMT) --desktop -d . --template vim.desktop.in -o tmp_vim.desktop
+- rm -f LINGUAS
+ if command -v desktop-file-validate; then desktop-file-validate tmp_vim.desktop; fi
+ mv tmp_vim.desktop vim.desktop
+
+-gvim.desktop: gvim.desktop.in $(POFILES)
+- echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
++gvim.desktop: gvim.desktop.in $(POFILES) LINGUAS
+ $(MSGFMT) --desktop -d . --template gvim.desktop.in -o tmp_gvim.desktop
+- rm -f LINGUAS
+ if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
+ mv tmp_gvim.desktop gvim.desktop
+
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 \
file://vim-add-knob-whether-elf.h-are-checked.patch \
file://0001-src-Makefile-improve-reproducibility.patch \
file://no-path-adjust.patch \
+ file://racefix.patch \
"
SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"