From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5/8] Use the normal download method for Tremor
Date: Mon, 13 Sep 2010 10:55:20 +0200 [thread overview]
Message-ID: <20100913105520.1a2ed8b8@surf> (raw)
In-Reply-To: <1284367351.1742.29.camel@sven>
Hello Sven,
On Mon, 13 Sep 2010 10:42:31 +0200
Sven Neumann <s.neumann@raumfeld.com> wrote:
> will this new code still try to access a tarball in the dl directory and
> then try to get a tarball from the primary mirror before it actually
> tries to get the snapshot from the SVN repository?
Yes, this is exactly what it does. In patch 4/8 :
+define DOWNLOAD_GIT
+ pushd $(DL_DIR) > /dev/null && \
+ $(GIT) clone $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
+ pushd $($(PKG)_BASE_NAME) > /dev/null && \
+ $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \
+ gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \
+ popd > /dev/null && \
+ rm -rf $($(PKG)_DL_DIR) && \
+ popd > /dev/null
+endef
Does the git clone and then creates a tarball stored in $(DL_DIR).
And then:
define DOWNLOAD
$(Q)test -e $(DL_DIR)/$(2) || \
- for site in $(call qstrip,$(BR2_PRIMARY_SITE)) $(1) $(call qstrip,$(BR2_BACKUP_SITE)); \
- do $(WGET) -P $(DL_DIR) $$site/$(2) && exit; done
+ (if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
+ $(call DOWNLOAD_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \
+ fi ; \
+ if test -n "$(1)" ; then \
+ case "$($(PKG)_SITE_METHOD)" in \
+ git) $(DOWNLOAD_GIT) && exit ;; \
+ svn) $(DOWNLOAD_SVN) && exit ;; \
+ *) $(call DOWNLOAD_WGET,$(1),$(2)) && exit ;; \
+ esac ; \
+ fi ; \
+ if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \
+ $(call DOWNLOAD_WGET,$(BR2_BACKUP_SITE),$(2)) && exit ; \
+ fi ; \
+ exit 1)
endef
First checks if BR2_PRIMARY_SITE is set, and if yes, tries to fetch the
tarball from here. Only if it's not available from the primary site, we
go to actually fetching using git, svn or wget from the project
official location.
Does this sounds ok for you ?
> IMO it is very important that it continues to work that way. I don't
> want our nightly builds to pull snapshots from the SVN repository over
> and over again. This wastes bandwidth, slows down the builds and breaks
> the build every so often (if the SVN server is unreachable).
Absolutely, this is why SVN and Git fetch methods have been implemented
to be as similar as the existing tarball download method.
Thanks for your feedback,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2010-09-13 8:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 6:50 [Buildroot] [pull request] Pull request for branch for-2010.11/download-rework Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 1/8] Remove the spider feature Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 2/8] Cleanup the VCS commands configuration Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 3/8] Update defconfigs with new VCS config options Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 4/8] Implement basic non-wget download methods Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 5/8] Use the normal download method for Tremor Thomas Petazzoni
2010-09-13 8:42 ` Sven Neumann
2010-09-13 8:55 ` Thomas Petazzoni [this message]
2010-09-13 15:45 ` Quotient Remainder
2010-09-13 17:13 ` Thomas Petazzoni
2010-09-14 9:40 ` Maxime Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 6/8] Use the normal download method for libsvgtiny Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 7/8] Re-implement the source-check and external-deps targets Thomas Petazzoni
2010-09-13 6:50 ` [Buildroot] [PATCH 8/8] Revert "Makefile.package.in: allow packages to override download step" Thomas Petazzoni
2010-09-17 12:11 ` [Buildroot] [pull request] Pull request for branch for-2010.11/download-rework Peter Korsgaard
-- strict thread matches above, loose matches on Subject: below --
2010-09-02 10:09 [Buildroot] [RESEND/PATCH] Git/Svn downloaders Maxime Petazzoni
2010-09-02 10:09 ` [Buildroot] [PATCH 5/8] Use the normal download method for Tremor Maxime 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=20100913105520.1a2ed8b8@surf \
--to=thomas.petazzoni@free-electrons.com \
--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