Skip to content

Commit 409b88d

Browse files
committed
Fix race condition between linking ruby and update-default-gemspecs
`yes-update-default-gemspecs` uses `$(XRUBY)` which execs the ruby binary, but only depended on `main` (extensions and encodings). When `make runirb` runs with parallel jobs, the linker may still be writing the ruby binary while `update-default-gemspecs` tries to exec it, causing `Errno::EACCES` (Permission denied). Add `$(PROGRAM)` as a dependency so the binary is fully linked before attempting to execute it. This is to prevent CI from randomly failing on the runirb step, e.g. https://github.com/ruby/ruby/actions/runs/23921136182/job/69767485157?pr=16648
1 parent b2e032d commit 409b88d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ no-test-bundled-gems-precheck:
15781578

15791579
update-default-gemspecs: $(TEST_RUNNABLE)-update-default-gemspecs
15801580
no-update-default-gemspecs:
1581-
yes-update-default-gemspecs: $(PRECHECK_BUNDLED_GEMS:yes=main)
1581+
yes-update-default-gemspecs: $(PRECHECK_BUNDLED_GEMS:yes=main) $(PROGRAM)
15821582
@$(MAKEDIRS) $(srcdir)/.bundle/specifications
15831583
@$(XRUBY) -W0 -C "$(srcdir)" -rrubygems \
15841584
-e "destdir = ARGV.shift" \

0 commit comments

Comments
 (0)