RFR: JDK-8044480: JDK image target overwrites lib/server/libjsig.dylib symlink with a copy of lib/libjsig.dylib

Tim Bell tim.bell at oracle.com
Mon Jun 2 16:28:53 UTC 2014


Erik:

Looks good to me as well.

Tim

On 06/02/14 13:02, Daniel D. Daugherty wrote:
> Erik,
>
> Thanks for the very fast turn around on this.
>
> I could not think of a good way to test this for unexpected side
> effects other than to make the change and watch for fallout. I was
> not able to envision a scenario where replacing a regular file
> with a symlink to a copy of the same file would be functionally
> different.
>
> Thumbs up.
>
> Dan
>
> P.S.
> Ron is on vacation this week so please don't wait for a code
> review from him.
>
>
> On 6/2/14 6:54 AM, Erik Joelsson wrote:
>> Hello,
>>
>> Please review this small fix to images/bundle build on Macosx. In the 
>> macosx specific j2*-bundle, lib/server/libjsig.dylib is not a symlink 
>> to ../libjsig.dylib like on other platforms (or like in j2*-image). 
>> This behavior dates back to the original macosx port and was 
>> intentionally emulated in the new build in JDK 8.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8044480
>> The fix in JDK 9 inline:
>>
>> diff --git a/make/Bundles.gmk b/make/Bundles.gmk
>> --- a/make/Bundles.gmk
>> +++ b/make/Bundles.gmk
>> @@ -74,19 +74,16 @@
>>    JDK_TARGET_LIST := $(subst 
>> $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
>>    JRE_TARGET_LIST := $(subst 
>> $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
>>
>> -  # The old builds implementation of this did not preserve symlinks so
>> -  # make sure they are followed and the contents copied instead.
>> -  # To fix this, remove -L
>>    # Copy empty directories (jre/lib/applet).
>>    $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
>>      $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
>>      $(MKDIR) -p $(@D)
>> -    if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' 
>> '$@'; fi
>> +    if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' 
>> '$@'; fi
>>
>>    $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
>>      $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
>>      $(MKDIR) -p $(@D)
>> -    if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' 
>> '$@'; fi
>> +    if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' 
>> '$@'; fi
>>
>>    $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
>>      $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
>>
>>
>> /Erik
>




More information about the build-dev mailing list