* [Buildroot] [PATCH] support/download: further silence the git helper @ 2015-01-04 18:10 Yann E. MORIN 2015-01-05 11:35 ` Fabio Porcedda 2015-01-05 14:15 ` Thomas Petazzoni 0 siblings, 2 replies; 4+ messages in thread From: Yann E. MORIN @ 2015-01-04 18:10 UTC (permalink / raw) To: buildroot We expresely call printf in the git helper, calls which were not addresed in the previous silent-build patchset. Just redirect stdout to oblivion when being silent. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- support/download/git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/download/git b/support/download/git index 7f1801f..73cbc0f 100755 --- a/support/download/git +++ b/support/download/git @@ -14,7 +14,7 @@ set -e verbose=-v while getopts :q OPT; do case "${OPT}" in - q) verbose=-q;; + q) verbose=-q; exec >/dev/null;; \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; esac done -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] support/download: further silence the git helper 2015-01-04 18:10 [Buildroot] [PATCH] support/download: further silence the git helper Yann E. MORIN @ 2015-01-05 11:35 ` Fabio Porcedda 2015-01-05 17:40 ` Yann E. MORIN 2015-01-05 14:15 ` Thomas Petazzoni 1 sibling, 1 reply; 4+ messages in thread From: Fabio Porcedda @ 2015-01-05 11:35 UTC (permalink / raw) To: buildroot On Sun, Jan 4, 2015 at 7:10 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > We expresely call printf in the git helper, calls which were not > addresed in the previous silent-build patchset. > > Just redirect stdout to oblivion when being silent. > > Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > --- > support/download/git | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/support/download/git b/support/download/git > index 7f1801f..73cbc0f 100755 > --- a/support/download/git > +++ b/support/download/git > @@ -14,7 +14,7 @@ set -e > verbose=-v > while getopts :q OPT; do > case "${OPT}" in > - q) verbose=-q;; > + q) verbose=-q; exec >/dev/null;; As general rule It's best to use "&&" instead of ";" so any error can be caught, otherwise is: Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com> Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com> BR -- Fabio Porcedda ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] support/download: further silence the git helper 2015-01-05 11:35 ` Fabio Porcedda @ 2015-01-05 17:40 ` Yann E. MORIN 0 siblings, 0 replies; 4+ messages in thread From: Yann E. MORIN @ 2015-01-05 17:40 UTC (permalink / raw) To: buildroot Fabio, All, On 2015-01-05 12:35 +0100, Fabio Porcedda spake thusly: > On Sun, Jan 4, 2015 at 7:10 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > We expresely call printf in the git helper, calls which were not > > addresed in the previous silent-build patchset. > > > > Just redirect stdout to oblivion when being silent. > > > > Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > --- > > support/download/git | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/support/download/git b/support/download/git > > index 7f1801f..73cbc0f 100755 > > --- a/support/download/git > > +++ b/support/download/git > > @@ -14,7 +14,7 @@ set -e > > verbose=-v > > while getopts :q OPT; do > > case "${OPT}" in > > - q) verbose=-q;; > > + q) verbose=-q; exec >/dev/null;; > > As general rule It's best to use "&&" instead of ";" so any error can > be caught, That is really not necessary, because the backend scripts are all 'set -e', so they exit on the first error that occurs. Besides, even if they were not 'set -e', then the '&&' construct would not catch the error at all, and the script would continue without redirecting. Furthermore, in that case, we're doing two things: - set a variable - redirect stdout to /dev/null If either were to fail, you would have a hell of a bigger problem: - unable to set a variable: big problem in the shell - not able to redirect: /dev/null does not exist, or you do not have the rights to write to it. In either case, this would be a really, *really* big problem, which I doubt we should care about. ;-) > otherwise is: > Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com> > Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com> Thanks! 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] 4+ messages in thread
* [Buildroot] [PATCH] support/download: further silence the git helper 2015-01-04 18:10 [Buildroot] [PATCH] support/download: further silence the git helper Yann E. MORIN 2015-01-05 11:35 ` Fabio Porcedda @ 2015-01-05 14:15 ` Thomas Petazzoni 1 sibling, 0 replies; 4+ messages in thread From: Thomas Petazzoni @ 2015-01-05 14:15 UTC (permalink / raw) To: buildroot Dear Yann E. MORIN, On Sun, 4 Jan 2015 19:10:14 +0100, Yann E. MORIN wrote: > We expresely call printf in the git helper, calls which were not > addresed in the previous silent-build patchset. > > Just redirect stdout to oblivion when being silent. > > Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Applied, thanks. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-05 17:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-01-04 18:10 [Buildroot] [PATCH] support/download: further silence the git helper Yann E. MORIN 2015-01-05 11:35 ` Fabio Porcedda 2015-01-05 17:40 ` Yann E. MORIN 2015-01-05 14:15 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox