Bug 52480

Summary: Fix a race in _gen/reentrant-methods.list
Product: Telepathy Reporter: Ross Burton <ross>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix a race in _gen/reentrant-methods.list

Description Ross Burton 2012-07-25 12:08:07 UTC
Very occasionally, a parallel build will fail like this:

| Making all in telepathy-glib
| make[2]: Entering directory `/buildarea1/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/telepathy-glib-0.19.2-r0/telepathy-glib-0.19.2/telepathy-glib'
| /bin/mkdir -p _gen
| ( cd . && cat versions/0.7.0.abi [...] versions/0.19.2.abi  ) | \
| 		/bin/grep '^tp_cli_.*_run_.*' > _gen/reentrant-methods.list.tmp
| /bin/sh: line 1: _gen/reentrant-methods.list.tmp: No such file or directory
| make[2]: *** [_gen/reentrant-methods.list] Error 1

It's doing the mkdir and the subshell in parallel, when the mkdir should be done
first.  Add an explicit dependency on spec-stamp to reentrant-methods.list to
ensure the ordering.
Comment 1 Ross Burton 2012-07-25 12:08:09 UTC
Created attachment 64670 [details] [review]
Fix a race in _gen/reentrant-methods.list
Comment 2 Simon McVittie 2012-07-26 10:48:11 UTC
Comment on attachment 64670 [details] [review]
Fix a race in _gen/reentrant-methods.list

Review of attachment 64670 [details] [review]:
-----------------------------------------------------------------

Looks good to me, I'll apply it. Also reviewed by Jonny on IRC.

Regression in 0.19.x, no backport to 0.18 needed.
Comment 3 Simon McVittie 2012-07-26 11:03:21 UTC
Fixed in git for 0.19.6, thanks

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.