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

Remove the chroot hack for 14936 #12

Closed
fpqc opened this issue Sep 29, 2016 · 7 comments
Closed

Remove the chroot hack for 14936 #12

fpqc opened this issue Sep 29, 2016 · 7 comments

Comments

@fpqc
Copy link

fpqc commented Sep 29, 2016

Hiya @RoliSoft ; New build (14936) adds support for chroot, so you can probably fix your arch installer hack (if you want to check for WinBuild number).

Cheers!

@thebitstick
Copy link

The non-Insider builds won't get this for months, so I don't think he should remove it yet.

@RoliSoft
Copy link
Owner

The chroot hack won't be removed, since I'm not an Insider either, and as @thebitstick said, we won't see chroot support for a few more months.

The underlying issue here is to update the script to detect Windows's build version or probe for chroot, and apply fix if needed. I'm not yet sure how to do this with the limited tools available at my disposal during a fresh install, but I'll try to whip something up.

@thebitstick
Copy link

thebitstick commented Sep 29, 2016

You could try sys.getwindowsversion()

import sys
sys.getwindowsversion()

Output:
sys.getwindowsversion(major=10, minor=0, build=14393, platform=2, service_pack='')

EDIT:
You can use sys.getwindowsversion().build

import sys
sys.getwindowsversion().build

Output:
14393

@RoliSoft
Copy link
Owner

@thebitstick The problem is not getting the Windows version under Windows, but under WSL, since the hook script is a Bash script which is running under WSL.

That being said, I probably could get the Windows build version from Python, and pass it along to the hook scripts as an environmental variable WINVER or something. Seems less intrusive than packaging a statically compiled chroot-prober.

@thebitstick
Copy link

thebitstick commented Sep 29, 2016

You could check for the build number in the install script, and pass a Boolean to the hook.

@RoliSoft
Copy link
Owner

You could pass something like CHROOT_SUPPORT, but imho a more generic WINVER is better, since further down the line new features will be added to WSL which the hook script will need to account for, so it's better if I pass the build number straight to the hook script, and let it deal with it however it wants to.

@RoliSoft
Copy link
Owner

d8bf12b fixes this.

Took a bit longer to write, since I was busy experimenting with and implementing the native decompression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants