RFC: Fix --enable-hg in IcedTea6
Omair Majid
omajid at redhat.com
Mon Jun 1 09:31:36 PDT 2009
Andrew John Hughes wrote:
> 2009/6/1 Omair Majid <omajid at redhat.com>:
>> Hi,
>>
>> Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16"
>> fails when applying the patches, even though jdk6-b16 is a known good build.
>> The issues appears to be that the Makefile removes the old hotspot only if
>> the openjdk directory doesn't already exist.
>>
>> The attached patch checks USE_HG and then removes the hotspot directory so
>> it can be replaced with HS14.
>>
>> ChangeLog:
>> 2009-06-01 Omair Majid <omajid at redhat.com>
>>
>> * Makefile.am (stamps/extract.stamp): Remove hotspot if using
>> --enable-hg and an alternate hotspot build.
>>
>> Can someone please review the patch?
>>
>> Cheers,
>> Omair
>>
>
> The presumption was that anyone wanting to use Mercurial as a source
> wanted the whole thing.
I see. What about the patches then? Should we apply patches from the
original hotspot? Or leave out the hotspot patches completely?
>
> I don't see how the attached patch can work. This would stop the
> hotspot directory not being removed when Mercurial is disabled, and
> doesn't do anything about the if block which checks for the openjdk
> directory.
Err...too many negatives in that sentence, so apologies if I
misunderstand something. The patch works (as in I can do a 'make patch'
with this change applied and everything works). If mercurial is
disabled, it does nothing - it only comes into play if --enable-hg is
used. In that case, it deletes the hotspot directory so the alternate
hotspot tarball is used. Currently hotspot is only replaced if there is
no openjdk directory. In case of --enable-hg, there is, so hotspot wasnt
being replaced. The patch explicitly rm -rf's the old hotspot direcotry
so it is replaced with HS14. Anyway, the entire point is moot if the
purpose of --enable-hg is to provide the unmodified hotspot.
>
> stamps/extract.stamp: stamps/download.stamp
> if OPENJDK_SRC_DIR_FOUND
> cp -a $(OPENJDK_SRC_DIR) openjdk
> else
> if ! test -d openjdk ; \
> then \
> mkdir openjdk ; \
> $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \
> chmod -R ug+w openjdk ; \
> if test "x${HSBUILD}" != "xoriginal"; then \
> rm -rf openjdk/hotspot ; \
> fi ; \
> sh $(abs_top_srcdir)/fsg.sh ; \
> fi
> if WITH_ALT_HSBUILD
> if test -e ${HOTSPOT_SRC_ZIP} ; \
> then \
> if ! test -d openjdk/hotspot ; \
> then \
> $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \
> chmod -R ug+w master-* ; \
> mv master-$$($(AWK) 'version==$$1 {print $$2}'
> version=$(HSBUILD) \
> $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \
> fi ; \
> fi
> endif
> endif
>
> The simplest solution is probably to add an additional target for the
> HotSpot replacement so it isn't so tightly related to extraction.
That makes sense, I will see what I can do.
Cheers,
Omair
More information about the distro-pkg-dev
mailing list