From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/7] pkg-generic: refactor the "Downloading" message logic
Date: Sun, 15 Mar 2015 17:44:57 +0100 [thread overview]
Message-ID: <5505B709.8030402@openwide.fr> (raw)
In-Reply-To: <1425147313-17380-5-git-send-email-thomas.petazzoni@free-electrons.com>
Hi Thomas,
Le 28/02/2015 19:15, Thomas Petazzoni a ?crit :
> In the .stamp_downloaded hook, the logic to decide whether or not to
> display the "Downloading" message is treating the check of
> <pkg>_SOURCE as a special case. But in fact, there is no real reason
> to do so: the existing loop used for <pkg>_PATCH and
> <pkg>_EXTRA_DOWNLOADS could work just as well.
>
> This commit therefore refactors this piece of code, to have a single
> loop checking <pkg>_SOURCE, <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
Reviewed-by: Romain Naour <romain.naour@openwide.fr>
> package/pkg-generic.mk | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 0098b29..7a9da43 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -73,16 +73,12 @@ $(BUILD_DIR)/%/.stamp_downloaded:
> $(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
> ifeq ($(DL_MODE),DOWNLOAD)
> # Only show the download message if it isn't already downloaded
> - $(Q)if test ! -e $(DL_DIR)/$($(PKG)_SOURCE); then \
> - $(call MESSAGE,"Downloading") ; \
> - else \
> - for p in $($(PKG)_PATCH) $($(PKG)_EXTRA_DOWNLOADS) ; do \
> - if test ! -e $(DL_DIR)/`basename $$p` ; then \
> - $(call MESSAGE,"Downloading") ; \
> - break ; \
> - fi ; \
> - done ; \
> - fi
> + $(Q)for p in $($(PKG)_SOURCE) $($(PKG)_PATCH) $($(PKG)_EXTRA_DOWNLOADS) ; do \
> + if test ! -e $(DL_DIR)/`basename $$p` ; then \
> + $(call MESSAGE,"Downloading") ; \
> + break ; \
> + fi ; \
> + done
> endif
> $(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE)))
> $(foreach p,$($(PKG)_EXTRA_DOWNLOADS),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))$(sep))
>
next prev parent reply other threads:[~2015-03-15 16:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-28 18:15 [Buildroot] [PATCH 0/7] Improvements to the download logic Thomas Petazzoni
2015-02-28 18:15 ` [Buildroot] [PATCH 1/7] linux: use the package infrastructure to download patches Thomas Petazzoni
2015-02-28 19:54 ` Baruch Siach
2015-03-15 14:59 ` Romain Naour
2015-03-15 15:14 ` Thomas Petazzoni
2015-03-15 15:58 ` Romain Naour
2015-03-22 15:15 ` Arnout Vandecappelle
2015-03-15 16:44 ` Romain Naour
2015-03-22 15:16 ` Arnout Vandecappelle
2015-02-28 18:15 ` [Buildroot] [PATCH 2/7] pkg-generic: fix the logic showing the "Downloading" message Thomas Petazzoni
2015-03-15 16:44 ` Romain Naour
2015-03-22 15:19 ` Arnout Vandecappelle
2015-02-28 18:15 ` [Buildroot] [PATCH 3/7] pkg-generic: take into account <pkg>_EXTRA_DOWNLOADS to display " Thomas Petazzoni
2015-03-15 16:44 ` Romain Naour
2015-03-22 15:20 ` Arnout Vandecappelle
2015-02-28 18:15 ` [Buildroot] [PATCH 4/7] pkg-generic: refactor the "Downloading" message logic Thomas Petazzoni
2015-03-15 16:44 ` Romain Naour [this message]
2015-03-22 15:29 ` Arnout Vandecappelle
2015-02-28 18:15 ` [Buildroot] [PATCH 5/7] pkg-generic: allow full URLs for <pkg>_EXTRA_DOWNLOADS Thomas Petazzoni
2015-03-15 16:45 ` Romain Naour
2015-03-22 15:33 ` Arnout Vandecappelle
2015-02-28 18:15 ` [Buildroot] [PATCH 6/7] docs/manual: update documentation about <pkg>_SOURCE, <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS Thomas Petazzoni
2015-03-15 16:45 ` Romain Naour
2015-03-22 15:58 ` Arnout Vandecappelle
2015-02-28 18:15 ` [Buildroot] [PATCH 7/7] perl: use <pkg>_EXTRA_DOWNLOADS Thomas Petazzoni
2015-03-15 16:46 ` Romain Naour
2015-03-22 15:59 ` Arnout Vandecappelle
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=5505B709.8030402@openwide.fr \
--to=romain.naour@openwide.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