badass-runtime-plugin icon indicating copy to clipboard operation
badass-runtime-plugin copied to clipboard

Symlinks converted to regular files on merge

Open averms opened this issue 4 years ago • 1 comments

Looking at the jre/legal folder in build/:

├── legal
│   ├── java.base
│   │   ├── ADDITIONAL_LICENSE_INFO
│   │   ├── aes.md
│   │   ├── asm.md
│   │   ├── ASSEMBLY_EXCEPTION
│   │   ├── cldr.md
│   │   ├── c-libutl.md
│   │   ├── icu.md
│   │   ├── LICENSE
│   │   ├── public_suffix.md
│   │   └── unicode.md
│   └── jdk.unsupported
│       ├── ADDITIONAL_LICENSE_INFO -> ../java.base/ADDITIONAL_LICENSE_INFO
│       ├── ASSEMBLY_EXCEPTION -> ../java.base/ASSEMBLY_EXCEPTION
│       └── LICENSE -> ../java.base/LICENSE

We can see that the license files in jdk.unsupported link to the ones in java.base. After merging to the image folder in build/ we get

├── legal
│   ├── java.base
│   │   ├── ADDITIONAL_LICENSE_INFO
│   │   ├── aes.md
│   │   ├── asm.md
│   │   ├── ASSEMBLY_EXCEPTION
│   │   ├── cldr.md
│   │   ├── c-libutl.md
│   │   ├── icu.md
│   │   ├── LICENSE
│   │   ├── public_suffix.md
│   │   └── unicode.md
│   └── jdk.unsupported
│       ├── ADDITIONAL_LICENSE_INFO
│       ├── ASSEMBLY_EXCEPTION
│       └── LICENSE

The license files in jdk.unsupported are turned into regular files with 777 permissions. I imagine the symlink removal is on purpose (symlinks in zip files don't work with Windows anyway), but why are the permissions changed?

averms avatar Dec 12 '21 08:12 averms

There's an open issue about symlink copying for Gradle itself: https://github.com/gradle/gradle/issues/3982

It wouldn't surprise me if this is just another casualty of that.

It might be possible to work around it, but the best outcome is they fix it.

hakanai avatar Jan 15 '23 08:01 hakanai