--- old/common/makefiles/MakeBase.gmk 2013-03-28 17:12:27.916957030 +0100 +++ new/common/makefiles/MakeBase.gmk 2013-03-28 17:12:27.816939731 +0100 @@ -381,9 +381,15 @@ $(CP) -f -r -P '$<' '$(@D)' endef else ifeq ($(OPENJDK_TARGET_OS),macosx) +# On mac, extended attributes sometimes creep into the source files, which may later +# cause the creation of ._* files which confuses testing. Clear these with xattr if +# set. Some files get their write permissions removed after being copied to the +# output dir. When these are copied again to images, xattr would fail. By only clearing +# attributes when they are present, failing on this is avoided. define install-file $(MKDIR) -p $(@D) - $(CP) -fpRP '$<' '$@' + $(CP) -fRP '$<' '$@' + if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi endef else define install-file