Le 19/04/2012 15:02, Mirko Vogt a écrit :
On 04/19/2012 11:43 AM, Emmanuel Deloget wrote:
Force the use of known revision for specific eglibc versions.
Eglibc revision can only be changed if the user selects the trunk
version.
Signed-off-by: Emmanuel Deloget<[email protected]>
Index: toolchain/eglibc/Config.in
===================================================================
--- toolchain/eglibc/Config.in (révision 31345)
+++ toolchain/eglibc/Config.in (copie de travail)
@@ -22,15 +22,19 @@
endchoice
+config EGLIBC_TRUNK_REVISION
+ string
+ prompt "eglibc revision"
+ depends on TOOLCHAINOPTS&& USE_EGLIBC&& EGLIBC_VERSION_TRUNK
+ default "HEAD"
+
config EGLIBC_REVISION
string
- prompt "eglibc revision"
depends on TOOLCHAINOPTS&& USE_EGLIBC
default "14661" if EGLIBC_VERSION_2_12
default "15508" if EGLIBC_VERSION_2_13
default "16488" if EGLIBC_VERSION_2_14
- default "HEAD" if EGLIBC_VERSION_TRUNK
- default ""
+ default EGLIBC_TRUNK_REVISION if EGLIBC_VERSION_TRUNK
menu "eglibc configuration"
depends on TOOLCHAINOPTS&& USE_EGLIBC
The issue with "HEAD" is, that the fetched source will be packed and put
into dl/ (sth. like eglibc-trunk-HEAD.tar.gz).
In the next run this archive will be taken instead of fetching the "new"
HEAD, since it doesn't contain and rev-nr (but just 'HEAD') in the
revision-string and therewith in the filename.
There's also no checksum for the archive (obviously), so the build
system will not now when to re-fetch the src or to rely - which is the
default - on using the packed archive in dl/.
Good catch. In fact, HEAD is likely to never be the right choice, even
in other packages. So maybe we can forbid it?
Another solution would be to not create the tar.gz if revision is HEAD.
By definition, HEAD might have changed since your last compile, so if
you make package/clean, it should fetch a new version.
Something like (not sure that work, so don't apply it; I'm currently
testing it but in order to do so, I have to make distclean, so it takes
some time...)
Index: include/download.mk
===================================================================
--- include/download.mk (révision 31345)
+++ include/download.mk (copie de travail)
@@ -74,9 +74,12 @@
svn export --non-interactive --trust-server-cert -r$(VERSION)
$(URL) $(SUBDIR) || \
svn export --non-interactive -r$(VERSION) $(URL) $(SUBDIR) ) &&
\
echo "Packing checkout..." && \
- $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
- mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
- rm -rf $(SUBDIR); \
+ { [ "$(VERSION)" = "HEAD" ] || { \
+ $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+ mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+ rm -rf $(SUBDIR); \
+ } ; \
+ } ; \
)
endef
Since fetching the latest HEAD of any external source is uncommon and to
be avoided anyway (since builds are non-deterministic and changes to
external repositories might result in unpredictable build behaviours)
I'd like to drop the option of fetching trunk/HEAD at all. Comments?
I believe that having a way to fetch a development version of eglibc
makes sense in the OpenWRT trunk (but makes far less sense in the
backfire branch). In the proposal below, I added a config option to
reflect that (obviously, this config option shall be n on stable
branches).
Changing the prompts in the Config.in file helps to make this clearer
-------8<-----------------------------------------------------------------
Force the use of known revision for specific eglibc versions.
Eglibc revision can only be changed if the user wants it (this patch
makes this choice much clear).
Since this is probably not a good thing to allow that on stable
branches, we add a new config symbol whose value is supposed to
be y on bleeding edge OpenWRT, and n on stable branches).
Signed-off-by: Emmanuel Deloget <[email protected]>
Index: Config.in
===================================================================
--- Config.in (révision 31345)
+++ Config.in (copie de travail)
@@ -10,6 +10,10 @@
bool
default y
+config OPENWRT_BLEEDING_EDGE
+ bool
+ default y
+
source "target/Config.in"
menu "Target Images"
Index: toolchain/eglibc/Config.in
===================================================================
--- toolchain/eglibc/Config.in (révision 31345)
+++ toolchain/eglibc/Config.in (copie de travail)
@@ -18,19 +18,32 @@
depends !GCC_VERSION_LLVM
config EGLIBC_VERSION_TRUNK
- bool "eglibc trunk"
+ bool "specific SVN revision on trunk"
+ depends OPENWRT_BLEEDING_EDGE
endchoice
+config EGLIBC_TRUNK_REVISION
+ string
+ prompt "eglibc SVN revision"
+ depends on TOOLCHAINOPTS && USE_EGLIBC && EGLIBC_VERSION_TRUNK
+ default "HEAD"
+ help
+ Select the SVN trunk revision that matches your needs. Please
+ remember that not all SVN revisions can produce valid eglibc
+ binaries, and that some versions may produce binaries that
+ seems valid but that may fail during runtime.
+ The option is provided as a convenience, but is otherwise fully
+ unsupported (i.e. the OpenWRT will probably not answer to bug
+ reports related to the use of this option).
+
config EGLIBC_REVISION
string
- prompt "eglibc revision"
depends on TOOLCHAINOPTS && USE_EGLIBC
default "14661" if EGLIBC_VERSION_2_12
default "15508" if EGLIBC_VERSION_2_13
default "16488" if EGLIBC_VERSION_2_14
- default "HEAD" if EGLIBC_VERSION_TRUNK
- default ""
+ default EGLIBC_TRUNK_REVISION if EGLIBC_VERSION_TRUNK
menu "eglibc configuration"
depends on TOOLCHAINOPTS && USE_EGLIBC
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel