Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv3 06/18] pkg-download: extend DOWNLOAD_INNER, add a SOURCE_CHECK macro
Date: Sat, 25 Apr 2015 19:15:45 +0200	[thread overview]
Message-ID: <20150425171545.GH4275@free.fr> (raw)
In-Reply-To: <1429972982-25495-7-git-send-email-thomas.petazzoni@free-electrons.com>

Thomas, All,

On 2015-04-25 16:42 +0200, Thomas Petazzoni spake thusly:
> As part of moving to a package infrastructure based source-check
> implementation, we are going to move away from the global DL_MODE
> variable to select the behavior of the DOWNLOAD_INNER macro.
> 
> As a preparation to this, this commit makes the DOWNLOAD_INNER macro
> take a third argument, which is the action to be done: either DOWNLOAD
> or SOURCE_CHECK. For now, the DOWNLOAD macro passes $(DL_MODE) as this
> third argument, in order to keep the existing behavior.
> 
> In addition, a SOURCE_CHECK macro is added, which calls DOWNLOAD_INNER
> with the appropriate action. This macro will be used in the upcoming
> package infra based implementation of source-check.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> [tested by doing a "make source" on a randpackageconfig]
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Superfluous SoB-line.

Regards,
Yann E. MORIN.

> ---
>  package/pkg-download.mk | 28 ++++++++++++++++------------
>  1 file changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/package/pkg-download.mk b/package/pkg-download.mk
> index eee9e59..76afced 100644
> --- a/package/pkg-download.mk
> +++ b/package/pkg-download.mk
> @@ -212,14 +212,18 @@ endef
>  ################################################################################
>  
>  define DOWNLOAD
> -	$(call DOWNLOAD_INNER,$(1),$(notdir $(1)))
> +	$(call DOWNLOAD_INNER,$(1),$(notdir $(1)),$(DL_MODE))
> +endef
> +
> +define SOURCE_CHECK
> +	$(call DOWNLOAD_INNER,$(1),$(notdir $(1)),SOURCE_CHECK)
>  endef
>  
>  define DOWNLOAD_INNER
>  	$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
>  		case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
> -			scp) $(call $(DL_MODE)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
> -			*) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
> +			scp) $(call $(3)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
> +			*) $(call $(3)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
>  		esac ; \
>  	fi ; \
>  	if test "$(BR2_PRIMARY_SITE_ONLY)" = "y" ; then \
> @@ -232,18 +236,18 @@ define DOWNLOAD_INNER
>  			scheme="$($(PKG)_SITE_METHOD)" ; \
>  		fi ; \
>  		case "$$scheme" in \
> -			git) $($(DL_MODE)_GIT) && exit ;; \
> -			svn) $($(DL_MODE)_SVN) && exit ;; \
> -			cvs) $($(DL_MODE)_CVS) && exit ;; \
> -			bzr) $($(DL_MODE)_BZR) && exit ;; \
> -			file) $($(DL_MODE)_LOCALFILES) && exit ;; \
> -			scp) $($(DL_MODE)_SCP) && exit ;; \
> -			hg) $($(DL_MODE)_HG) && exit ;; \
> -			*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
> +			git) $($(3)_GIT) && exit ;; \
> +			svn) $($(3)_SVN) && exit ;; \
> +			cvs) $($(3)_CVS) && exit ;; \
> +			bzr) $($(3)_BZR) && exit ;; \
> +			file) $($(3)_LOCALFILES) && exit ;; \
> +			scp) $($(3)_SCP) && exit ;; \
> +			hg) $($(3)_HG) && exit ;; \
> +			*) $(call $(3)_WGET,$(1),$(2)) && exit ;; \
>  		esac ; \
>  	fi ; \
>  	if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \
> -		$(call $(DL_MODE)_WGET,$(BR2_BACKUP_SITE)/$(2),$(2)) && exit ; \
> +		$(call $(3)_WGET,$(BR2_BACKUP_SITE)/$(2),$(2)) && exit ; \
>  	fi ; \
>  	exit 1
>  endef
> -- 
> 2.1.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-04-25 17:15 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-25 14:42 [Buildroot] [PATCHv3 00/18] Package based 'source', 'legal-info', 'source-check' and 'external-deps' Thomas Petazzoni
2015-04-25 14:42 ` [Buildroot] [PATCHv3 01/18] fs: only add non rootfs- targets to PACKAGES Thomas Petazzoni
2015-04-25 16:36   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 02/18] pkg-generic: take into account patch dependencies in source, external-deps and legal-info Thomas Petazzoni
2015-04-25 16:41   ` Yann E. MORIN
2015-04-26  9:38     ` Thomas Petazzoni
2015-04-25 14:42 ` [Buildroot] [PATCHv3 03/18] Makefile: use the package infra based external-deps Thomas Petazzoni
2015-04-25 14:42 ` [Buildroot] [PATCHv3 04/18] pkg-download: remove support for the SHOW_EXTERNAL_DEPS DL_MODE Thomas Petazzoni
2015-04-25 14:42 ` [Buildroot] [PATCHv3 05/18] Makefile: move source-check outside of noconfig_targets Thomas Petazzoni
2015-04-25 14:42 ` [Buildroot] [PATCHv3 06/18] pkg-download: extend DOWNLOAD_INNER, add a SOURCE_CHECK macro Thomas Petazzoni
2015-04-25 17:15   ` Yann E. MORIN [this message]
2015-04-25 14:42 ` [Buildroot] [PATCHv3 07/18] pkg-generic: implement source-check targets Thomas Petazzoni
2015-04-25 17:28   ` Yann E. MORIN
2015-04-26  9:39     ` Thomas Petazzoni
2015-04-26 14:12       ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 08/18] Makefile: implement a package based source-check target Thomas Petazzoni
2015-04-25 14:42 ` [Buildroot] [PATCHv3 09/18] pkg-generic: remove the .stamp_rsync_sourced fake stamp file Thomas Petazzoni
2015-04-25 17:33   ` Yann E. MORIN
2015-04-25 17:49     ` Thomas Petazzoni
2015-04-25 17:52       ` Yann E. MORIN
2015-04-28 20:13       ` Arnout Vandecappelle
2015-04-25 17:53   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 10/18] pkg-generic: don't use DL_MODE in .stamp_downloaded Thomas Petazzoni
2015-04-25 17:34   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 11/18] pkg-download: get rid of DL_MODE Thomas Petazzoni
2015-04-25 17:35   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 12/18] pkg-download: fix indentation for SOURCE_CHECK_* macros Thomas Petazzoni
2015-04-25 17:37   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 13/18] pkg-generic: introduce a <pkg>_ALL_DOWNLOADS variable and factorize code Thomas Petazzoni
2015-04-25 17:58   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 14/18] Makefile: implement the 'source' target using the package infrastructure Thomas Petazzoni
2015-04-25 18:51   ` Yann E. MORIN
2015-04-25 14:42 ` [Buildroot] [PATCHv3 15/18] Makefile: remove unneeded variables Thomas Petazzoni
2015-04-25 18:58   ` Yann E. MORIN
2015-04-25 14:43 ` [Buildroot] [PATCHv3 16/18] Makefile: add BR_BUILDING variable Thomas Petazzoni
2015-04-25 20:26   ` Yann E. MORIN
2015-04-25 21:14     ` Yann E. MORIN
2015-04-26  9:40       ` Thomas Petazzoni
2015-04-26 14:13         ` Yann E. MORIN
2015-04-25 14:43 ` [Buildroot] [PATCHv3 17/18] packages: refactor checks using BR_BUILDING Thomas Petazzoni
2015-04-25 20:52   ` Yann E. MORIN
2015-04-25 21:59     ` Yann E. MORIN
2015-04-26  9:42     ` Thomas Petazzoni
2015-04-26 14:18       ` Yann E. MORIN
2015-04-25 14:43 ` [Buildroot] [PATCHv3 18/18] Makefile: add a few more targets to nobuild_targets Thomas Petazzoni
2015-04-25 14:45 ` [Buildroot] [PATCHv3 00/18] Package based 'source', 'legal-info', 'source-check' and 'external-deps' Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150425171545.GH4275@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox