Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python2: don't install 2to3, clashes with Python3 equivalent #3358

Merged
merged 3 commits into from
Mar 19, 2019
Merged

Python2: don't install 2to3, clashes with Python3 equivalent #3358

merged 3 commits into from
Mar 19, 2019

Conversation

MilhouseVH
Copy link
Contributor

@MilhouseVH MilhouseVH commented Mar 9, 2019

Noticed this Python3 failure on Jenkins:

(cd /var/lib/jenkins/LE/build2/workspace/Addons/Category/service/snapserver/build.LibreELEC-RK3328.arm-9.1-devel/toolchain/bin; ln -s 2to3-3.7 2to3)
/usr/bin/install -c -m 644 /var/lib/jenkins/LE/build2/workspace/Addons/Category/service/snapserver/build.LibreELEC-RK3328.arm-9.1-devel/Python3-3.7.1/Include/fileutils.h /var/lib/jenkins/LE/build2/workspace/Addons/Category/service/snapserver/build.LibreELEC-RK3328.arm-9.1-devel/toolchain/include/python3.7
/usr/bin/install -c -m 644 /var/lib/jenkins/LE/build2/workspace/Addons/Category/service/snapserver/build.LibreELEC-RK3328.arm-9.1-devel/Python3-3.7.1/Include/floatobject.h /var/lib/jenkins/LE/build2/workspace/Addons/Category/service/snapserver/build.LibreELEC-RK3328.arm-9.1-devel/toolchain/include/python3.7
ln: failed to create symbolic link '2to3': File exists
make: *** [Makefile:1225: bininstall] Error 1

Python2 is also installing 2to3 in toolchain/bin:

copying build/scripts-2.7/2to3 -> /var/lib/jenkins/LE/build2/workspace/Addons/Category/service/snapserver/build.LibreELEC-RK3328.arm-9.1-devel/toolchain/bin

so if Python2 finishes before Python3, then Python3 will fail as above.

Obviously we need to prevent Python2 installing toolchain/bin/2to3. I can't find a clean solution so have patched it out for now (only temporary until we bin Python2 completely).

@MilhouseVH
Copy link
Contributor Author

More fun with Python. Adding the clobber commit.

Python2 creates files with read-only permissions:

neil@nm-linux:/tmp/toolchain$ ls -la /home/neil/projects/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.1-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib/libpython2.7.so.1.0
-r-xr-xr-x 1 neil neil 3952760 Mar  3 00:43 /home/neil/projects/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.1-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib/libpython2.7.so.1.0

so a re-build fails because the new files from the isolated sysroot can't overwrite the existing read-only files. Eugh.

-f to the rescue.

@chewitt chewitt merged commit 94cfb21 into LibreELEC:master Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants