Skip to content

Commit 4c776eb

Browse files
jefferytograysky2
authored andcommitted
python3: Fix race condition when doing parallel builds
When doing parallel builds, host Python can install the python3 symlink before the Python standard library is installed completely. When this occurs, it is possible for other packages to detect the python3 symlink and try to use host Python before it is fully installed. This adds a patch to make commoninstall (where the standard library is installed) a prerequisite of bininstall (where the python3 symlink is installed), so that commoninstall is fully completed before bininstall begins. Patch has been submitted upstream: python/cpython#104693 Fixes: openwrt#19241 Signed-off-by: Jeffery To <[email protected]>
1 parent 1e90043 commit 4c776eb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/Makefile.pre.in
2+
+++ b/Makefile.pre.in
3+
@@ -1361,7 +1361,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
4+
$(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
5+
fi
6+
7+
-bininstall: altbininstall
8+
+bininstall: commoninstall altbininstall
9+
if test ! -d $(DESTDIR)$(LIBPC); then \
10+
echo "Creating directory $(LIBPC)"; \
11+
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \

0 commit comments

Comments
 (0)