[OpenWrt-Devel] [PATCH v2] build: download code from github using archive API

Yousong Zhou yszhou4tech at gmail.com
Fri Jun 29 02:26:39 EDT 2018


On Fri, 29 Jun 2018 at 14:17, Jo-Philipp Wich <jo at mein.io> wrote:
>
> Hi,
>
> > Looks like it's caused by the excessive python script call.  This is
> > indeed unexpected.  I just pushed a commit to disable it altogether
> > for now.  Sorry for the inconvenience ;(
>
> is there anything preventing you from doing a change like below to wire
> in the github archiving script?
>
> -- 8< --
> diff --git a/include/download.mk b/include/download.mk
> index 3634e777c9..5a9328b55d 100644
> --- a/include/download.mk
> +++ b/include/download.mk
> @@ -23,13 +23,15 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
>  define dl_method
>  $(strip \
>    $(if $(2),$(2), \
> -    $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/%
> @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
> -      $(if $(filter git://%,$(1)),git, \
> -        $(if $(filter svn://%,$(1)),svn, \
> -          $(if $(filter cvs://%,$(1)),cvs, \
> -            $(if $(filter hg://%,$(1)),hg, \
> -              $(if $(filter sftp://%,$(1)),bzr, \
> -                unknown \
> +    $(if $(filter git://github.com/%
> https://github.com/%,$(1)),github-tarball, \

It's possible that https://github.com/% is a URL to uploaded static
release tarballs and in that case the "default" should be used.  I
chose to implement the dl_method in python thinking that it should be
more expressive without so many levels of nested if/else when writing
such logic.

                yousong

> +      $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/%
> @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
> +        $(if $(filter git://%,$(1)),git, \
> +          $(if $(filter svn://%,$(1)),svn, \
> +            $(if $(filter cvs://%,$(1)),cvs, \
> +              $(if $(filter hg://%,$(1)),hg, \
> +                $(if $(filter sftp://%,$(1)),bzr, \
> +                  unknown \
> +                ) \
>                ) \
>              ) \
>            ) \
> -- >8 --
>
> ~ Jo
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list