diff options
author | Ross Burton <ross.burton@intel.com> | 2019-09-13 13:04:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-16 23:02:45 +0100 |
commit | 7981d54fe68e68be7754ca18b38cd4e23e8a0c5e (patch) | |
tree | 2939e8cef3e291608e9960f8f105cd6c995537c5 /meta/recipes-gnome/gnome | |
parent | 92469aad50b623afa423c19d82ed2e3c667c5e6a (diff) | |
download | poky-7981d54fe68e68be7754ca18b38cd4e23e8a0c5e.tar.gz |
adwaita-icon-theme: fix rare install race
There have been rare errors during the build of adwaita-icon-theme, such as:
Exception: bb.process.ExecutionError: Execution of '.../temp/run.sysroot_stage_all.45186' failed with exit code 2:
cpio: ./icons/Adwaita/32x32/legacy/_inst.34160_: Cannot stat: No such file or directory
cpio: ./icons/Adwaita/32x32/legacy/_inst.33428_: Cannot stat: No such file or directory
cpio: ./icons/Adwaita/32x32/legacy/_inst.35421_: Cannot stat: No such file or directory
cpio: ./icons/Adwaita/32x32/legacy/_inst.34533_: Cannot stat: No such file or directory
cpio: ./icons/Adwaita/32x32/legacy/_inst.35366_: Cannot stat: No such file or directory
The problem was that a previous optimisation (oe-core cd9af17028) to massively
increase the install speed (by parallelling the hundreds of installs) was subtly
wrong. It was essentially doing this:
for i in list; do
install i &
done
wait
In pure shell this does parallelise the install commands and then wait for them
all to finish before exiting, but in Makefiles *each line in a separate shell*. The actual Makefile is closer to this:
for i in list; do \
install i & \
done
wait
The backslashes are required to write a multi-line for loop in a Makefile, but
note that when the loop ends the shell exits and all of the install processes
that are still running are disowned. The wait command then executes in a new
shell, and there are no childen to wait for.
The fix is trivial: add more backslashes so that the wait is part of the same
shell.
(From OE-Core rev: f969a8ff160390726565421d4c9b367e49172487)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/gnome')
-rw-r--r-- | meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch index 6c38e237f4..c4d7e2583b 100644 --- a/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch +++ b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch | |||
@@ -24,7 +24,8 @@ index 1c940a5..3998ee6 100644 | |||
24 | - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \ | 24 | - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \ |
25 | + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \ | 25 | + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \ |
26 | done; \ | 26 | done; \ |
27 | done; | 27 | - done; |
28 | + done; \ | ||
28 | + wait | 29 | + wait |
29 | 30 | ||
30 | ## FIXME we should add a way to remove links generated by icon mapping | 31 | ## FIXME we should add a way to remove links generated by icon mapping |
@@ -45,7 +46,8 @@ index 86f4d7c..3fae8c1 100644 | |||
45 | $(mkdir_p) $(DESTDIR)$(themedir)/scalable-up-to-32/$$context; \ | 46 | $(mkdir_p) $(DESTDIR)$(themedir)/scalable-up-to-32/$$context; \ |
46 | - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file; \ | 47 | - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file; \ |
47 | + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \ | 48 | + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \ |
48 | done | 49 | - done |
50 | + done; \ | ||
49 | + wait | 51 | + wait |
50 | 52 | ||
51 | uninstall-local: | 53 | uninstall-local: |
@@ -61,7 +63,8 @@ index 24aac9b..61ba071 100644 | |||
61 | - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \ | 63 | - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \ |
62 | + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \ | 64 | + $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \ |
63 | done; \ | 65 | done; \ |
64 | done | 66 | - done |
67 | + done; \ | ||
65 | for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \ | 68 | for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \ |
66 | context="`dirname $$file`"; \ | 69 | context="`dirname $$file`"; \ |
67 | $(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \ | 70 | $(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \ |
@@ -72,7 +75,8 @@ index 24aac9b..61ba071 100644 | |||
72 | - $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context; \ | 75 | - $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context; \ |
73 | + $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context & \ | 76 | + $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context & \ |
74 | done \ | 77 | done \ |
75 | done | 78 | - done |
79 | + done; \ | ||
76 | + wait | 80 | + wait |
77 | 81 | ||
78 | uninstall-local: | 82 | uninstall-local: |