GNOME Bugzilla – Bug 758029
Install race in helpers
Last modified: 2015-12-04 14:45:46 UTC
Created attachment 315364 [details] [review] Patch libs/gst/helpers/Makefile.am has a install hook which can cause install races and thus errors: | /usr/bin/install: cannot create regular file `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-pam/build/build/tmp/work/core2-64-poky-linux/gstreamer1.0/1.6.1-r0/image/usr/lib/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner': File exists This needs to be a install-data-hook not an install-exec-hook as the helpers are installed into helperdir which is considered data (only path variables with "exec" in are considered executables). http://www.gnu.org/software/automake/manual/html_node/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install The explicit dependency on install-helpersPROGRAMS was an attempt at solving this, but this causes occasional races where install-helpersPROGRAMS can run twice in parallel (once via install-all, once via the hook's dependency).
commit 09aa20746a0fef97fb811c5503928c13a1f55eb5 Author: Ross Burton <ross.burton@intel.com> Date: Thu Nov 12 19:46:44 2015 +0000 helpers: fix install race The install hook needs to be a install-data-hook not an install-exec-hook as the helpers are installed into helperdir which is considered data (only path variables with "exec" in are considered executables). The explicit dependency on install-helpersPROGRAMS was an attempt at solving this, but this causes occasional races where install-helpersPROGRAMS can run twice in parallel (once via install-all, once via the hook's dependency). https://bugzilla.gnome.org/show_bug.cgi?id=758029
So my patch wasn't entirely right and there's still a race, just even more rare now.
Created attachment 316770 [details] [review] Really fix
commit 0c6be6604aafa84b525088d1ef4a4486d907743c Author: Ross Burton <ross.burton@intel.com> Date: Fri Dec 4 14:39:29 2015 +0000 helpers: really fix install race My previous fix for #758029 wasn't quite right and simply made the race rarer. Some of the files are installed by install-exec and others by install-exec, so the hooks need to be split too.