Skip to content

Cross targeting fails on Windows if target runtime contains symlinks #22

@aahlenst

Description

@aahlenst

assertRequestSuccess(t, "http://localhost:8080/x64/linux/11.0.8+10?modules=java.base", "linux")
fails on Windows. The reason is that the tar.gz for Linux contains symlinks. Those cause archiver.Unarchive() to fail (as well as 7zip, so not archiver's fault) with the following error:

reading file in tar archive: C:\Users\andreas\AppData\Local\Temp\runtime_cache\OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10\jdk-11.0.8+10\legal\jdk.localedata\ASSEMBLY_EXCEPTION: making symbolic link for: symlink ..\java.base\ASSEMBLY_EXCEPTION C:\Users\andreas\AppData\Local\Temp\runtime_cache\OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10\jdk-11.0.8+10\legal\jdk.localedata\ASSEMBLY_EXCEPTION: A required privilege is not held by the client.

I'm not sure how to proceed here. https://pkg.go.dev/github.com/mholt/archiver/v3#TarGz has no option to ignore symlinks or continue on error. We could ignore the return code and continue no matter what, but I don't think this is desirable.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions