On 04/19/2012 04:00 PM, Emmanuel Deloget wrote:
> Good catch. In fact, HEAD is likely to never be the right choice, even
> in other packages. So maybe we can forbid it?
That's what I meant with:
"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."
> 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
>
I think your ideas to change download.mk make sense and provide benefits
to developers (when $REV is 'HEAD' it should always re-fetch the src
(independent of used SCM)). Quite some people asked yet how to always
fetch HEAD from (custom) repositories and I was missing this
functionality in some custom projects myself.
> +config OPENWRT_BLEEDING_EDGE
> + bool
> + default y
> +
Introducing OPENWRT_BLEEDING_EDGE raises the impression of
over-engineering to me. We still should try to avoid fetching HEAD of
sources (see above), however IF we provide the possibility - which is
opt-in and just for developers anyway - I don't see the point of
"un-hide" respective options first.
PS: Please try to quote only parts in your replies you're explicitly
referring to. Otherwise threads get unreadable and confusing.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel