* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
@ 2014-11-24 13:56 Fabio Porcedda
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build Fabio Porcedda
` (6 more replies)
0 siblings, 7 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-11-24 13:56 UTC (permalink / raw)
To: buildroot
This patch set improves silent builds.
Silent builds are nice when top-level parallel make is being used to
reduce the output clutter.
The change logs are in each patch.
Best regards
Fabio Porcedda (5):
support/download: silence git if it is a silent build
support/download: silence svn if it is a silent build
support/download: pass the quiet flag to the hg download helper
support/download: pass the quiet flag to the wget download helper
support/download: pass the quiet flag to the scp download helper
package/pkg-download.mk | 21 +++++++++++++--------
support/download/git | 14 ++++++++++----
support/download/hg | 5 +++--
support/download/scp | 3 ++-
support/download/svn | 4 +++-
support/download/wget | 3 ++-
6 files changed, 33 insertions(+), 17 deletions(-)
--
2.1.3
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
@ 2014-11-24 13:56 ` Fabio Porcedda
2014-11-26 21:35 ` Yann E. MORIN
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 2/5] support/download: silence svn " Fabio Porcedda
` (5 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Fabio Porcedda @ 2014-11-24 13:56 UTC (permalink / raw)
To: buildroot
If it is a silent build (make -s -> QUIET=-q) silence the git download
helper using "git clone -q" just like others download helpers,
e.g. wget.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
Notes:
v3:
- add this patch
package/pkg-download.mk | 3 ++-
support/download/git | 14 ++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index f3409bd..95175d6 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -99,7 +99,8 @@ define DOWNLOAD_GIT
$(DL_DIR)/$($(PKG)_SOURCE) \
$($(PKG)_SITE) \
$($(PKG)_DL_VERSION) \
- $($(PKG)_BASE_NAME)
+ $($(PKG)_BASE_NAME) \
+ $(QUIET)
endef
# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
diff --git a/support/download/git b/support/download/git
index 5d36ca4..4ce9030 100755
--- a/support/download/git
+++ b/support/download/git
@@ -9,6 +9,7 @@ set -e
# $2: git repo
# $3: git cset
# $4: package's basename (eg. foobar-1.2.3)
+# $5: "-q", optional quiet flag
# And this environment:
# GIT : the git command to call
@@ -16,21 +17,26 @@ output="${1}"
repo="${2}"
cset="${3}"
basename="${4}"
+quiet="${5}"
# Try to see if we can do a shallow clone, since it is faster
# than a full clone.
git_done=0
if [ -n "$(${GIT} ls-remote "${repo}" "${cset}" 2>&1)" ]; then
- printf "Doing shallow clone\n"
- if ${GIT} clone --depth 1 -b "${cset}" --bare "${repo}" "${basename}"; then
+ if [ -z "${quiet}" ]; then
+ printf "Doing shallow clone\n";
+ fi
+ if ${GIT} clone ${quiet} --depth 1 -b "${cset}" --bare "${repo}" "${basename}"; then
git_done=1
else
printf "Shallow clone failed, falling back to doing a full clone\n"
fi
fi
if [ ${git_done} -eq 0 ]; then
- printf "Doing full clone\n"
- ${GIT} clone --bare "${repo}" "${basename}"
+ if [ -z "${quiet}" ]; then
+ printf "Doing full clone\n";
+ fi
+ ${GIT} clone ${quiet} --bare "${repo}" "${basename}"
fi
GIT_DIR="${basename}" \
--
2.1.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 2/5] support/download: silence svn if it is a silent build
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build Fabio Porcedda
@ 2014-11-24 13:56 ` Fabio Porcedda
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 3/5] support/download: pass the quiet flag to the hg download helper Fabio Porcedda
` (4 subsequent siblings)
6 siblings, 0 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-11-24 13:56 UTC (permalink / raw)
To: buildroot
If it is a silent build (make -s -> QUIET=-q) silence the svn download
helper using "svn -q" just like others download helpers, e.g. wget.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
---
Notes:
v4:
- instead of changing the "SVN" variable pass the "-q" option to the
download helper (Thomas P.)
v3:
- add this patch
package/pkg-download.mk | 3 ++-
support/download/svn | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 95175d6..a8a042b 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -156,7 +156,8 @@ define DOWNLOAD_SVN
$(DL_DIR)/$($(PKG)_SOURCE) \
$($(PKG)_SITE) \
$($(PKG)_DL_VERSION) \
- $($(PKG)_BASE_NAME)
+ $($(PKG)_BASE_NAME) \
+ $(QUIET)
endef
define SOURCE_CHECK_SVN
diff --git a/support/download/svn b/support/download/svn
index a960f7d..d75f306 100755
--- a/support/download/svn
+++ b/support/download/svn
@@ -9,6 +9,7 @@ set -e
# $2: svn repo
# $3: svn revision
# $4: package's basename (eg. foobar-1.2.3)
+# $5: "-q", optional quiet flag
# And this environment:
# SVN : the svn command to call
@@ -16,7 +17,8 @@ output="${1}"
repo="${2}"
rev="${3}"
basename="${4}"
+quiet="${5}"
-${SVN} export "${repo}@${rev}" "${basename}"
+${SVN} ${quiet} export "${repo}@${rev}" "${basename}"
tar czf "${output}" "${basename}"
--
2.1.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 3/5] support/download: pass the quiet flag to the hg download helper
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build Fabio Porcedda
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 2/5] support/download: silence svn " Fabio Porcedda
@ 2014-11-24 13:57 ` Fabio Porcedda
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 4/5] support/download: pass the quiet flag to the wget " Fabio Porcedda
` (3 subsequent siblings)
6 siblings, 0 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-11-24 13:57 UTC (permalink / raw)
To: buildroot
To be coherent to others download helper, instead of adding the "QUIET"
variable to the "HG" variable, pass the "QUIET" variable to the hg
download helper.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
Notes:
v4:
- add this patch
package/pkg-download.mk | 5 +++--
support/download/hg | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index a8a042b..1aeea3a 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -13,7 +13,7 @@ export SVN := $(call qstrip,$(BR2_SVN))
export CVS := $(call qstrip,$(BR2_CVS))
export BZR := $(call qstrip,$(BR2_BZR))
export GIT := $(call qstrip,$(BR2_GIT))
-export HG := $(call qstrip,$(BR2_HG)) $(QUIET)
+export HG := $(call qstrip,$(BR2_HG))
export SCP := $(call qstrip,$(BR2_SCP)) $(QUIET)
SSH := $(call qstrip,$(BR2_SSH)) $(QUIET)
export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
@@ -194,7 +194,8 @@ define DOWNLOAD_HG
$(DL_DIR)/$($(PKG)_SOURCE) \
$($(PKG)_SITE) \
$($(PKG)_DL_VERSION) \
- $($(PKG)_BASE_NAME)
+ $($(PKG)_BASE_NAME) \
+ $(QUIET)
endef
# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
diff --git a/support/download/hg b/support/download/hg
index 66bd2ed..1047483 100755
--- a/support/download/hg
+++ b/support/download/hg
@@ -16,9 +16,10 @@ output="${1}"
repo="${2}"
cset="${3}"
basename="${4}"
+quiet="${5}"
-${HG} clone --noupdate --rev "${cset}" "${repo}" "${basename}"
+${HG} ${quiet} clone --noupdate --rev "${cset}" "${repo}" "${basename}"
-${HG} archive --repository "${basename}" --type tgz \
+${HG} ${quiet} archive --repository "${basename}" --type tgz \
--prefix "${basename}" --rev "${cset}" \
"${output}"
--
2.1.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 4/5] support/download: pass the quiet flag to the wget download helper
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
` (2 preceding siblings ...)
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 3/5] support/download: pass the quiet flag to the hg download helper Fabio Porcedda
@ 2014-11-24 13:57 ` Fabio Porcedda
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 5/5] support/download: pass the quiet flag to the scp " Fabio Porcedda
` (2 subsequent siblings)
6 siblings, 0 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-11-24 13:57 UTC (permalink / raw)
To: buildroot
To be coherent to others download helper, instead of adding the "QUIET"
variable to the "WGET" variable, pass the "QUIET" variable to the wget
download helper.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
Notes:
v4:
- add this patch
package/pkg-download.mk | 5 +++--
support/download/wget | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 1aeea3a..074488d 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -8,7 +8,7 @@
################################################################################
# Download method commands
-export WGET := $(call qstrip,$(BR2_WGET)) $(QUIET)
+export WGET := $(call qstrip,$(BR2_WGET))
export SVN := $(call qstrip,$(BR2_SVN))
export CVS := $(call qstrip,$(BR2_CVS))
export BZR := $(call qstrip,$(BR2_BZR))
@@ -213,7 +213,8 @@ define DOWNLOAD_WGET
test -e $(DL_DIR)/$(2) || \
$(EXTRA_ENV) support/download/wrapper wget \
$(DL_DIR)/$(2) \
- '$(call qstrip,$(1))' && \
+ '$(call qstrip,$(1))' \
+ $(QUIET) && \
$(call VERIFY_HASH,$(PKGDIR)/$($(PKG)_NAME).hash,$(DL_DIR)/$(2))
endef
diff --git a/support/download/wget b/support/download/wget
index 6b73726..eaa150a 100755
--- a/support/download/wget
+++ b/support/download/wget
@@ -12,5 +12,6 @@ set -e
output="${1}"
url="${2}"
+quiet="${3}"
-${WGET} -O "${output}" "${url}"
+${WGET} ${quiet} -O "${output}" "${url}"
--
2.1.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 5/5] support/download: pass the quiet flag to the scp download helper
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
` (3 preceding siblings ...)
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 4/5] support/download: pass the quiet flag to the wget " Fabio Porcedda
@ 2014-11-24 13:57 ` Fabio Porcedda
2014-11-25 10:42 ` [Buildroot] [PATCH v4 next 0/5] Improve silent builds Jérôme Pouiller
2014-12-07 21:51 ` Yann E. MORIN
6 siblings, 0 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-11-24 13:57 UTC (permalink / raw)
To: buildroot
To be coherent to others download helper, instead of adding the "QUIET"
variable to the "SCP" variable, pass the "QUIET" variable to the scp
download helper.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
Notes:
v4:
- add this patch
package/pkg-download.mk | 5 +++--
support/download/scp | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 074488d..7b9e260 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -14,7 +14,7 @@ export CVS := $(call qstrip,$(BR2_CVS))
export BZR := $(call qstrip,$(BR2_BZR))
export GIT := $(call qstrip,$(BR2_GIT))
export HG := $(call qstrip,$(BR2_HG))
-export SCP := $(call qstrip,$(BR2_SCP)) $(QUIET)
+export SCP := $(call qstrip,$(BR2_SCP))
SSH := $(call qstrip,$(BR2_SSH)) $(QUIET)
export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
@@ -175,7 +175,8 @@ define DOWNLOAD_SCP
test -e $(DL_DIR)/$(2) || \
$(EXTRA_ENV) support/download/wrapper scp \
$(DL_DIR)/$(2) \
- '$(call stripurischeme,$(call qstrip,$(1)))' && \
+ '$(call stripurischeme,$(call qstrip,$(1)))' \
+ $(QUIET) && \
$(call VERIFY_HASH,$(PKGDIR)/$($(PKG)_NAME).hash,$(DL_DIR)/$(2))
endef
diff --git a/support/download/scp b/support/download/scp
index f3e92f3..cdcf71b 100755
--- a/support/download/scp
+++ b/support/download/scp
@@ -12,5 +12,6 @@ set -e
output="${1}"
url="${2}"
+quiet="${3}"
-${SCP} "${url}" "${output}"
+${SCP} ${quiet} "${url}" "${output}"
--
2.1.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
` (4 preceding siblings ...)
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 5/5] support/download: pass the quiet flag to the scp " Fabio Porcedda
@ 2014-11-25 10:42 ` Jérôme Pouiller
2014-11-25 16:09 ` Jérôme Pouiller
2014-12-01 17:51 ` Fabio Porcedda
2014-12-07 21:51 ` Yann E. MORIN
6 siblings, 2 replies; 17+ messages in thread
From: Jérôme Pouiller @ 2014-11-25 10:42 UTC (permalink / raw)
To: buildroot
Hello Fabio,
If you are interested to keep quiet builds, you may be interested by
a tool called "reredirect"[1].
reredirect allows to redirect outputs of a running program. I use
it to redirect output of make process (and its children) to log files
(eg. build/busybox-1.22.1/busybox_extract.log,
build/busybox-1.22.1/busybox_build.log, etc...).
To do this, I add this snippet in my local.mk :
define buildlog-silent
$(call MESSAGE,$(2))
if [ $(1) == start ]; then \
reredirect -m $(@D)/$(3)_$(2).log $$PPID > $(BUILD_DIR)/restore_$$PPID.cmd; \
else \
sh $(BUILD_DIR)/restore_$$PPID.cmd; \
rm $(BUILD_DIR)/restore_$$PPID.cmd; \
fi
endef
GLOBAL_INSTRUMENTATION_HOOKS += buildlog-silent
With that, my build only display steps names and all build output is
redirected to log files. I have also a more complex snippet to redirect
output to log file and to console. In this case, I use a fifo and "tee"
in add of "reredirect".
Note 1: You may have to disable ptrace_scope in order to make reredirect work:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
[1] https://github.com/jerome-pouiller/reredirect
On Monday 24 November 2014 14:56:57 Fabio Porcedda wrote:
> This patch set improves silent builds.
>
> Silent builds are nice when top-level parallel make is being used to
> reduce the output clutter.
>
> The change logs are in each patch.
>
> Best regards
> Fabio Porcedda (5):
> support/download: silence git if it is a silent build
> support/download: silence svn if it is a silent build
> support/download: pass the quiet flag to the hg download helper
> support/download: pass the quiet flag to the wget download helper
> support/download: pass the quiet flag to the scp download helper
>
> package/pkg-download.mk | 21 +++++++++++++--------
> support/download/git | 14 ++++++++++----
> support/download/hg | 5 +++--
> support/download/scp | 3 ++-
> support/download/svn | 4 +++-
> support/download/wget | 3 ++-
> 6 files changed, 33 insertions(+), 17 deletions(-)
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-11-25 10:42 ` [Buildroot] [PATCH v4 next 0/5] Improve silent builds Jérôme Pouiller
@ 2014-11-25 16:09 ` Jérôme Pouiller
2014-12-01 17:51 ` Fabio Porcedda
1 sibling, 0 replies; 17+ messages in thread
From: Jérôme Pouiller @ 2014-11-25 16:09 UTC (permalink / raw)
To: buildroot
On Tuesday 25 November 2014 11:42:29 J?r?me Pouiller wrote:
> Hello Fabio,
[...]
Oops... my mail was posted two times. Sorry.
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build Fabio Porcedda
@ 2014-11-26 21:35 ` Yann E. MORIN
2014-11-26 21:38 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-11-26 21:35 UTC (permalink / raw)
To: buildroot
Fabio, All,
On 2014-11-24 14:56 +0100, Fabio Porcedda spake thusly:
> If it is a silent build (make -s -> QUIET=-q) silence the git download
> helper using "git clone -q" just like others download helpers,
> e.g. wget.
>
> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> ---
>
> Notes:
> v3:
> - add this patch
>
> package/pkg-download.mk | 3 ++-
> support/download/git | 14 ++++++++++----
> 2 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/package/pkg-download.mk b/package/pkg-download.mk
> index f3409bd..95175d6 100644
> --- a/package/pkg-download.mk
> +++ b/package/pkg-download.mk
> @@ -99,7 +99,8 @@ define DOWNLOAD_GIT
> $(DL_DIR)/$($(PKG)_SOURCE) \
> $($(PKG)_SITE) \
> $($(PKG)_DL_VERSION) \
> - $($(PKG)_BASE_NAME)
> + $($(PKG)_BASE_NAME) \
> + $(QUIET)
> endef
>
> # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
> diff --git a/support/download/git b/support/download/git
> index 5d36ca4..4ce9030 100755
> --- a/support/download/git
> +++ b/support/download/git
> @@ -9,6 +9,7 @@ set -e
> # $2: git repo
> # $3: git cset
> # $4: package's basename (eg. foobar-1.2.3)
> +# $5: "-q", optional quiet flag
I am not a big fan of this.
I would prefer we pass the quiet flag through the environment, something
like this, for example:
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 9643a30..0399b73 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -69,7 +69,7 @@ endif
################################################################################
# Retrieve the archive
-$(BUILD_DIR)/%/.stamp_downloaded:
+$(BUILD_DIR)/%/.stamp_downloaded: export BR_QUIET=$(if $(QUIET),1,0)
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
ifeq ($(DL_MODE),DOWNLOAD)
# Only show the download message if it isn't already downloaded
Then the scripts would just check if ${BR_QUIET} is non 0.
Also, in retrospect, QUIET was not a really good name for this variable
in the Makefile. It would have been better if it were named BR_QUIET.
But that was introduced way before we decided on a variable naming
convention... :-/
> # And this environment:
> # GIT : the git command to call
>
> @@ -16,21 +17,26 @@ output="${1}"
> repo="${2}"
> cset="${3}"
> basename="${4}"
> +quiet="${5}"
>
> # Try to see if we can do a shallow clone, since it is faster
> # than a full clone.
> git_done=0
> if [ -n "$(${GIT} ls-remote "${repo}" "${cset}" 2>&1)" ]; then
> - printf "Doing shallow clone\n"
> - if ${GIT} clone --depth 1 -b "${cset}" --bare "${repo}" "${basename}"; then
> + if [ -z "${quiet}" ]; then
> + printf "Doing shallow clone\n";
> + fi
> + if ${GIT} clone ${quiet} --depth 1 -b "${cset}" --bare "${repo}" "${basename}"; then
> git_done=1
> else
> printf "Shallow clone failed, falling back to doing a full clone\n"
> fi
> fi
> if [ ${git_done} -eq 0 ]; then
> - printf "Doing full clone\n"
> - ${GIT} clone --bare "${repo}" "${basename}"
> + if [ -z "${quiet}" ]; then
> + printf "Doing full clone\n";
> + fi
> + ${GIT} clone ${quiet} --bare "${repo}" "${basename}"
> fi
>
> GIT_DIR="${basename}" \
> --
> 2.1.3
>
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build
2014-11-26 21:35 ` Yann E. MORIN
@ 2014-11-26 21:38 ` Thomas Petazzoni
2014-11-26 21:44 ` Yann E. MORIN
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2014-11-26 21:38 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Wed, 26 Nov 2014 22:35:34 +0100, Yann E. MORIN wrote:
> I am not a big fan of this.
>
> I would prefer we pass the quiet flag through the environment, something
> like this, for example:
On my side, I'm not a big fan of the environment, I find it a too
hidden way to pass things. However, I find it a bit clunky to have this
as a fifth optional argument. The solution I would find the cleanest
would be to use real arguments for the download helper scripts, using
getopt.
Like:
git -o <output> -r <repo> -c <cset> -b <basename> [-q]
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build
2014-11-26 21:38 ` Thomas Petazzoni
@ 2014-11-26 21:44 ` Yann E. MORIN
2014-11-26 21:55 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-11-26 21:44 UTC (permalink / raw)
To: buildroot
Thomas, Fabio, All,
On 2014-11-26 22:38 +0100, Thomas Petazzoni spake thusly:
> On Wed, 26 Nov 2014 22:35:34 +0100, Yann E. MORIN wrote:
> > I am not a big fan of this.
> >
> > I would prefer we pass the quiet flag through the environment, something
> > like this, for example:
>
> On my side, I'm not a big fan of the environment, I find it a too
> hidden way to pass things.However, I find it a bit clunky to have this
> as a fifth optional argument.
Well, the fact that we relied on the fact that -q is optional so had to
be the fifth argument is what bothered me. If we were to be adding new
optional flags, we'd be stuck. Passing them through the environment made
it possible to add extra optional flags (although I wonder what those
might be).
> The solution I would find the cleanest
> would be to use real arguments for the download helper scripts, using
> getopt.
>
> Like:
> git -o <output> -r <repo> -c <cset> -b <basename> [-q]
Yes, agreed.
Let's go for getopt in all helper scripts.
No need to recognise long options, though; shirt options are enough.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build
2014-11-26 21:44 ` Yann E. MORIN
@ 2014-11-26 21:55 ` Thomas Petazzoni
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2014-11-26 21:55 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Wed, 26 Nov 2014 22:44:42 +0100, Yann E. MORIN wrote:
> Well, the fact that we relied on the fact that -q is optional so had to
> be the fifth argument is what bothered me. If we were to be adding new
> optional flags, we'd be stuck. Passing them through the environment made
> it possible to add extra optional flags (although I wonder what those
> might be).
Yes, agreed: what bothered me is to start having optional arguments,
but use only the position of arguments. This clearly makes it difficult
to have additional optional arguments
> No need to recognise long options, though; shirt options are enough.
Agreed, short options are good enough.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-11-25 10:42 ` [Buildroot] [PATCH v4 next 0/5] Improve silent builds Jérôme Pouiller
2014-11-25 16:09 ` Jérôme Pouiller
@ 2014-12-01 17:51 ` Fabio Porcedda
1 sibling, 0 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-12-01 17:51 UTC (permalink / raw)
To: buildroot
On Tue, Nov 25, 2014 at 11:42 AM, J?r?me Pouiller <jezz@sysmic.org> wrote:
> Hello Fabio,
>
> If you are interested to keep quiet builds, you may be interested by
> a tool called "reredirect"[1].
>
> reredirect allows to redirect outputs of a running program. I use
> it to redirect output of make process (and its children) to log files
> (eg. build/busybox-1.22.1/busybox_extract.log,
> build/busybox-1.22.1/busybox_build.log, etc...).
>
> To do this, I add this snippet in my local.mk :
>
> define buildlog-silent
> $(call MESSAGE,$(2))
> if [ $(1) == start ]; then \
> reredirect -m $(@D)/$(3)_$(2).log $$PPID > $(BUILD_DIR)/restore_$$PPID.cmd; \
> else \
> sh $(BUILD_DIR)/restore_$$PPID.cmd; \
> rm $(BUILD_DIR)/restore_$$PPID.cmd; \
> fi
> endef
> GLOBAL_INSTRUMENTATION_HOOKS += buildlog-silent
>
>
> With that, my build only display steps names and all build output is
> redirected to log files. I have also a more complex snippet to redirect
> output to log file and to console. In this case, I use a fifo and "tee"
> in add of "reredirect".
>
>
> Note 1: You may have to disable ptrace_scope in order to make reredirect work:
> echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
>
>
> [1] https://github.com/jerome-pouiller/reredirect
Nice tool, thanks for letting me know about it.
BR
--
Fabio Porcedda
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
` (5 preceding siblings ...)
2014-11-25 10:42 ` [Buildroot] [PATCH v4 next 0/5] Improve silent builds Jérôme Pouiller
@ 2014-12-07 21:51 ` Yann E. MORIN
2014-12-07 21:54 ` Fabio Porcedda
6 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-12-07 21:51 UTC (permalink / raw)
To: buildroot
Fabio, All,
On 2014-11-24 14:56 +0100, Fabio Porcedda spake thusly:
> This patch set improves silent builds.
>
> Silent builds are nice when top-level parallel make is being used to
> reduce the output clutter.
Will you rework this series taking into account the comment Thomas and I
made on your first patch?
In the meantime, I've marked your patches as "Changes Requested" in our
Patchwork.
Thank you!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-12-07 21:51 ` Yann E. MORIN
@ 2014-12-07 21:54 ` Fabio Porcedda
2014-12-07 22:03 ` Yann E. MORIN
0 siblings, 1 reply; 17+ messages in thread
From: Fabio Porcedda @ 2014-12-07 21:54 UTC (permalink / raw)
To: buildroot
On Sun, Dec 7, 2014 at 10:51 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Fabio, All,
>
> On 2014-11-24 14:56 +0100, Fabio Porcedda spake thusly:
>> This patch set improves silent builds.
>>
>> Silent builds are nice when top-level parallel make is being used to
>> reduce the output clutter.
>
> Will you rework this series taking into account the comment Thomas and I
> made on your first patch?
Sure, i will do that when i have enough time to do that, right now i'm
quite busy.
> In the meantime, I've marked your patches as "Changes Requested" in our
> Patchwork.
BR
--
Fabio Porcedda
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-12-07 21:54 ` Fabio Porcedda
@ 2014-12-07 22:03 ` Yann E. MORIN
2014-12-23 9:00 ` Fabio Porcedda
0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-12-07 22:03 UTC (permalink / raw)
To: buildroot
Fabio, All,
On 2014-12-07 22:54 +0100, Fabio Porcedda spake thusly:
> On Sun, Dec 7, 2014 at 10:51 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > Fabio, All,
> >
> > On 2014-11-24 14:56 +0100, Fabio Porcedda spake thusly:
> >> This patch set improves silent builds.
> >>
> >> Silent builds are nice when top-level parallel make is being used to
> >> reduce the output clutter.
> >
> > Will you rework this series taking into account the comment Thomas and I
> > made on your first patch?
>
> Sure, i will do that when i have enough time to do that, right now i'm
> quite busy.
No problem, thank you! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v4 next 0/5] Improve silent builds
2014-12-07 22:03 ` Yann E. MORIN
@ 2014-12-23 9:00 ` Fabio Porcedda
0 siblings, 0 replies; 17+ messages in thread
From: Fabio Porcedda @ 2014-12-23 9:00 UTC (permalink / raw)
To: buildroot
On Sun, Dec 7, 2014 at 11:03 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Fabio, All,
>
> On 2014-12-07 22:54 +0100, Fabio Porcedda spake thusly:
>> On Sun, Dec 7, 2014 at 10:51 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> > Fabio, All,
>> >
>> > On 2014-11-24 14:56 +0100, Fabio Porcedda spake thusly:
>> >> This patch set improves silent builds.
>> >>
>> >> Silent builds are nice when top-level parallel make is being used to
>> >> reduce the output clutter.
>> >
>> > Will you rework this series taking into account the comment Thomas and I
>> > made on your first patch?
>>
>> Sure, i will do that when i have enough time to do that, right now i'm
>> quite busy.
>
> No problem, thank you! :-)
I've sent an updated version:
http://patchwork.ozlabs.org/bundle/fabio/silent-download-v5/
BR
--
Fabio Porcedda
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2014-12-23 9:00 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-24 13:56 [Buildroot] [PATCH v4 next 0/5] Improve silent builds Fabio Porcedda
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 1/5] support/download: silence git if it is a silent build Fabio Porcedda
2014-11-26 21:35 ` Yann E. MORIN
2014-11-26 21:38 ` Thomas Petazzoni
2014-11-26 21:44 ` Yann E. MORIN
2014-11-26 21:55 ` Thomas Petazzoni
2014-11-24 13:56 ` [Buildroot] [PATCH v4 next 2/5] support/download: silence svn " Fabio Porcedda
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 3/5] support/download: pass the quiet flag to the hg download helper Fabio Porcedda
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 4/5] support/download: pass the quiet flag to the wget " Fabio Porcedda
2014-11-24 13:57 ` [Buildroot] [PATCH v4 next 5/5] support/download: pass the quiet flag to the scp " Fabio Porcedda
2014-11-25 10:42 ` [Buildroot] [PATCH v4 next 0/5] Improve silent builds Jérôme Pouiller
2014-11-25 16:09 ` Jérôme Pouiller
2014-12-01 17:51 ` Fabio Porcedda
2014-12-07 21:51 ` Yann E. MORIN
2014-12-07 21:54 ` Fabio Porcedda
2014-12-07 22:03 ` Yann E. MORIN
2014-12-23 9:00 ` Fabio Porcedda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox