Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools
@ 2010-12-24 17:07 Thomas Petazzoni
  2010-12-24 17:07 ` [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2010-12-24 17:07 UTC (permalink / raw)
  To: buildroot

The following changes since commit c8530262260fee4b475ccca1ae04eb28433fc4eb:
  Thomas Petazzoni (1):
        toolchain: fix again stamp file touch

are available in the git repository at:

  git://git.busybox.net/~tpetazzoni/git/buildroot for-2011.02/dl-tools

Daniel Nystr??m (1):
      package/Makefile.package.in: Added BZR download support

Thomas Petazzoni (1):
      infrastructure: only require download tools when needed

 package/Makefile.package.in            |   53 ++++++++++++++++++++++++--------
 toolchain/dependencies/dependencies.mk |    7 ++++
 toolchain/dependencies/dependencies.sh |    2 +-
 3 files changed, 48 insertions(+), 14 deletions(-)

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support
  2010-12-24 17:07 [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Thomas Petazzoni
@ 2010-12-24 17:07 ` Thomas Petazzoni
  2010-12-25 22:30   ` Peter Korsgaard
  2010-12-24 17:07 ` [Buildroot] [PATCH 2/2] infrastructure: only require download tools when needed Thomas Petazzoni
  2010-12-27 20:34 ` [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2010-12-24 17:07 UTC (permalink / raw)
  To: buildroot

From: Daniel Nystr?m <daniel.nystrom@timeterminal.se>

Signed-off-by: Daniel Nystr?m <daniel.nystrom@timeterminal.se>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.package.in |   39 ++++++++++++++++++++++++++++-----------
 1 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 816a013..428dbcb 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -85,19 +85,21 @@ DL_DIR:=$(TOPDIR)/dl
 endif
 
 ################################################################################
-# The DOWNLOAD_{GIT,SVN} helpers are in charge of getting a working copy of
-# the source repository for their corresponding SCM, checking out the requested
-# version / commit / tag, and create an archive out of it. DOWNLOAD_WGET is the
-# normal wget-based download mechanism.
+# The DOWNLOAD_{GIT,SVN,BZR} helpers are in charge of getting a
+# working copy of the source repository for their corresponding SCM,
+# checking out the requested version / commit / tag, and create an
+# archive out of it. DOWNLOAD_WGET is the normal wget-based download
+# mechanism.
 #
-# The SOURCE_CHECK_{GIT,SVN,WGET} helpers are in charge of simply checking that
-# the source is available for download. This can be used to make sure one will
-# be able to get all the sources needed for one's build configuration.
+# The SOURCE_CHECK_{GIT,SVN,BZR,WGET} helpers are in charge of simply
+# checking that the source is available for download. This can be used
+# to make sure one will be able to get all the sources needed for
+# one's build configuration.
 #
-# The SHOW_EXTERNAL_DEPS_{GIT,SVN,WGET} helpers simply output to the console
-# the names of the files that will be downloaded, or path and revision of the
-# source repositories, producing a list of all the "external dependencies" of
-# a given build configuration.
+# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET} helpers simply output to
+# the console the names of the files that will be downloaded, or path
+# and revision of the source repositories, producing a list of all the
+# "external dependencies" of a given build configuration.
 ################################################################################
 
 define DOWNLOAD_GIT
@@ -123,6 +125,20 @@ define SHOW_EXTERNAL_DEPS_GIT
 endef
 
 
+define DOWNLOAD_BZR
+	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+	$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
+endef
+
+define SOURCE_CHECK_BZR
+	$(BZR) ls --quiet $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_BZR
+	echo "$($(PKG)_SITE) [bzr: $($(PKG)_DL_VERSION)]"
+endef
+
+
 define DOWNLOAD_SVN
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
 	(pushd $(DL_DIR) > /dev/null && \
@@ -175,6 +191,7 @@ define DOWNLOAD
 		case "$($(PKG)_SITE_METHOD)" in \
 			git) $($(DL_MODE)_GIT) && exit ;; \
 			svn) $($(DL_MODE)_SVN) && exit ;; \
+			bzr) $($(DL_MODE)_BZR) && exit ;; \
 			*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
 		esac ; \
 	fi ; \
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] infrastructure: only require download tools when needed
  2010-12-24 17:07 [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Thomas Petazzoni
  2010-12-24 17:07 ` [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support Thomas Petazzoni
@ 2010-12-24 17:07 ` Thomas Petazzoni
  2010-12-27 20:34 ` [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Peter Korsgaard
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2010-12-24 17:07 UTC (permalink / raw)
  To: buildroot

Instead of having to require svn, git or bzr unconditionally, only
require them when one package needs them to be downloaded.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.package.in            |   14 ++++++++++++--
 toolchain/dependencies/dependencies.mk |    7 +++++++
 toolchain/dependencies/dependencies.sh |    2 +-
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 428dbcb..c4a1cf8 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -504,9 +504,19 @@ $$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
 # configuration
 
 ifeq ($$(BR2_PACKAGE_$(2)),y)
+
 TARGETS += $(1)
-endif
-endef
+
+ifeq ($$($(2)_SITE_METHOD),svn)
+DL_TOOLS_DEPENDENCIES += svn
+else ifeq ($$($(2)_SITE_METHOD),git)
+DL_TOOLS_DEPENDENCIES += git
+else ifeq ($$($(2)_SITE_METHOD),bzr)
+DL_TOOLS_DEPENDENCIES += bzr
+endif # SITE_METHOD
+
+endif # BR2_PACKAGE_$(2)
+endef # GENTARGETS_INNER
 
 ################################################################################
 # GENTARGETS -- the target generator macro for generic packages
diff --git a/toolchain/dependencies/dependencies.mk b/toolchain/dependencies/dependencies.mk
index 89ffd88..13604f0 100644
--- a/toolchain/dependencies/dependencies.mk
+++ b/toolchain/dependencies/dependencies.mk
@@ -10,9 +10,16 @@ ifeq ($(BR2_STRIP_sstrip),y)
 DEPENDENCIES_HOST_PREREQ+=sstrip_host
 endif
 
+# Remove duplicate entries from $(DL_TOOLS_DEPENDENCIES)
+DL_TOOLS = \
+	$(findstring svn,$(DL_TOOLS_DEPENDENCIES)) \
+	$(findstring git,$(DL_TOOLS_DEPENDENCIES)) \
+	$(findstring bzr,$(DL_TOOLS_DEPENDENCIES))
+
 dependencies: $(DEPENDENCIES_HOST_PREREQ)
 	@HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \
 		CONFIG_FILE="$(CONFIG_DIR)/.config" \
+		DL_TOOLS="$(DL_TOOLS)" \
 		$(TOPDIR)/toolchain/dependencies/dependencies.sh
 
 dependencies-source:
diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh
index a152d4b..c5552ca 100755
--- a/toolchain/dependencies/dependencies.sh
+++ b/toolchain/dependencies/dependencies.sh
@@ -132,7 +132,7 @@ if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then
 fi;
 
 # Check that a few mandatory programs are installed
-for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio python svn unzip ; do
+for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio python unzip ${DL_TOOLS} ; do
     if ! which $prog > /dev/null ; then
 	/bin/echo -e "\nYou must install '$prog' on your build machine";
 	if test $prog = "makeinfo" ; then
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support
  2010-12-24 17:07 ` [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support Thomas Petazzoni
@ 2010-12-25 22:30   ` Peter Korsgaard
  2010-12-25 23:25     ` Daniel Nyström
  2010-12-26  9:21     ` Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Korsgaard @ 2010-12-25 22:30 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> From: Daniel Nystr?m <daniel.nystrom@timeterminal.se>
 Thomas> Signed-off-by: Daniel Nystr?m <daniel.nystrom@timeterminal.se>
 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  package/Makefile.package.in |   39 ++++++++++++++++++++++++++++-----------
 Thomas>  1 files changed, 28 insertions(+), 11 deletions(-)
 
 Thomas> +define DOWNLOAD_BZR
 Thomas> +	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
 Thomas> +	$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)

Shouldn't this make a tarball like the git/svn versions do?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support
  2010-12-25 22:30   ` Peter Korsgaard
@ 2010-12-25 23:25     ` Daniel Nyström
  2010-12-26  9:21     ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Nyström @ 2010-12-25 23:25 UTC (permalink / raw)
  To: buildroot

2010/12/25 Peter Korsgaard <jacmet@uclibc.org>:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
> ?Thomas> From: Daniel Nystr?m <daniel.nystrom@timeterminal.se>
> ?Thomas> Signed-off-by: Daniel Nystr?m <daniel.nystrom@timeterminal.se>
> ?Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ?Thomas> ---
> ?Thomas> ?package/Makefile.package.in | ? 39 ++++++++++++++++++++++++++++-----------
> ?Thomas> ?1 files changed, 28 insertions(+), 11 deletions(-)
>
> ?Thomas> +define DOWNLOAD_BZR
> ?Thomas> + ? ? ?test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
> ?Thomas> + ? ? ?$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
>
> Shouldn't this make a tarball like the git/svn versions do?

Bzr exports directly into a tarball:
http://doc.bazaar.canonical.com/bzr.2.2/en/user-reference/export-help.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support
  2010-12-25 22:30   ` Peter Korsgaard
  2010-12-25 23:25     ` Daniel Nyström
@ 2010-12-26  9:21     ` Thomas Petazzoni
  2010-12-27 20:33       ` Peter Korsgaard
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2010-12-26  9:21 UTC (permalink / raw)
  To: buildroot

On Sat, 25 Dec 2010 23:30:11 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:

>  Thomas> +define DOWNLOAD_BZR
>  Thomas> +	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
>  Thomas> +	$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
> 
> Shouldn't this make a tarball like the git/svn versions do?

I was also a little bit surprised, but bzr export creates a tarball
automatically.

I have tested those two patches by creating a simple package that gets
its source from BZR, and it worked properly (tarball created in
$(DL_DIR), and re-used at the next build).

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support
  2010-12-26  9:21     ` Thomas Petazzoni
@ 2010-12-27 20:33       ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2010-12-27 20:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> Shouldn't this make a tarball like the git/svn versions do?

 Thomas> I was also a little bit surprised, but bzr export creates a tarball
 Thomas> automatically.

 Thomas> I have tested those two patches by creating a simple package that gets
 Thomas> its source from BZR, and it worked properly (tarball created in
 Thomas> $(DL_DIR), and re-used at the next build).

Ok, thanks both - I'll pull it then.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools
  2010-12-24 17:07 [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Thomas Petazzoni
  2010-12-24 17:07 ` [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support Thomas Petazzoni
  2010-12-24 17:07 ` [Buildroot] [PATCH 2/2] infrastructure: only require download tools when needed Thomas Petazzoni
@ 2010-12-27 20:34 ` Peter Korsgaard
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2010-12-27 20:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The following changes since commit c8530262260fee4b475ccca1ae04eb28433fc4eb:
 Thomas>   Thomas Petazzoni (1):
 Thomas>         toolchain: fix again stamp file touch

 Thomas> are available in the git repository at:

 Thomas>   git://git.busybox.net/~tpetazzoni/git/buildroot for-2011.02/dl-tools

Pulled, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-27 20:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-24 17:07 [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Thomas Petazzoni
2010-12-24 17:07 ` [Buildroot] [PATCH 1/2] package/Makefile.package.in: Added BZR download support Thomas Petazzoni
2010-12-25 22:30   ` Peter Korsgaard
2010-12-25 23:25     ` Daniel Nyström
2010-12-26  9:21     ` Thomas Petazzoni
2010-12-27 20:33       ` Peter Korsgaard
2010-12-24 17:07 ` [Buildroot] [PATCH 2/2] infrastructure: only require download tools when needed Thomas Petazzoni
2010-12-27 20:34 ` [Buildroot] [pull request] Pull request for branch for-2011.02/dl-tools Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox