Skip to contentSkip to conversation

core/download: don't be needlessly verbose in backends

PATCH New Yann E. MORIN 3 participants 3 messages Jul 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 core/download: don't be needlessly verbose in backends

In 50c8b7e (support/download: support -q in all download backends), the backend were made to respect the quietness of the main Makefile, when -s is poassed on the 'make' command line. In doing so, they were all made to be verbose by default.

However, the verbosity of some of the tools, like scp, is very high, and is in fact intended for debug purposes.

Drop being verbose by default, just use whatever each tool deems normal output. Only respect the quietness requested by the user.

---
Change v1 -> v2:
- fix all backends, not just scp

---
 support/download/bzr  | 2 +-
 support/download/cp   | 5 +++++
 support/download/git  | 2 +-
 support/download/hg   | 2 +-
 support/download/scp  | 2 +-
 support/download/wget | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)
support/download/bzr +1 -1
index 870ce8d..c567466 100755
@@ -12,7 +12,7 @@ set -e
 #   BZR      : the bzr command to call
 
 
-verbose=-v
+verbose=
 while getopts :q OPT; do
     case "${OPT}" in
     q)  verbose=-q;;
support/download/cp +5 -0
index 132cad7..6e29eef 100755
@@ -11,7 +11,12 @@ set -e
 # Environment:
 #   LOCALFILES: the cp command to call
 
+# 'cp' usually does not print anything on its stdout, whereas the
+# other download backends, even if not verbose, at least print some
+# progress information.
+# Make 'cp' verbose by default, so it behaves a bit like the others.
 verbose=-v
+
 while getopts :q OPT; do
     case "${OPT}" in
     q)  verbose=;;
support/download/git +1 -1
index fd5f539..0e6103b 100755
@@ -11,7 +11,7 @@ set -e
 # Environment:
 #   GIT      : the git command to call
 
-verbose=-v
+verbose=
 while getopts :q OPT; do
     case "${OPT}" in
     q)  verbose=-q; exec >/dev/null;;
support/download/hg +1 -1
index f6880fa..d6654a1 100755
@@ -11,7 +11,7 @@ set -e
 # Environment:
 #   HG       : the hg command to call
 
-verbose=-v
+verbose=
 while getopts :q OPT; do
     case "${OPT}" in
     q)  verbose=-q;;
support/download/scp +1 -1
index 3d6876f..1a62f30 100755
@@ -11,7 +11,7 @@ set -e
 # Environment:
 #   SCP       : the scp command to call
 
-verbose=-v
+verbose=
 while getopts :q OPT; do
     case "${OPT}" in
     q)  verbose=-q;;
support/download/wget +1 -1
index 7eb21a4..885bcf1 100755
@@ -11,7 +11,7 @@ set -e
 # Environment:
 #   WGET     : the wget command to call
 
-verbose=-v
+verbose=
 while getopts :q OPT; do
     case "${OPT}" in
     q)  verbose=-q;;
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 core/download: don't be needlessly verbose in backends

Quoted 5 lines · Yann E. MORIN

In 50c8b7e (support/download: support -q in all download backends), the backend were made to respect the quietness of the main Makefile, when -s is poassed on the 'make' command line. In doing so, they were all made to be verbose by default.

Quoted 9 lines

However, the verbosity of some of the tools, like scp, is very high, and is in fact intended for debug purposes.

Drop being verbose by default, just use whatever each tool deems normal output. Only respect the quietness requested by the user.

(I tested the scp change already, and did manual tests of the output differences for hg, wget and cp.)

#2 lore raw

PATCH v2 1/1 core/download: don't be needlessly verbose in backends

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 17 lines · Yann E. MORIN

In 50c8b7e (support/download: support -q in all download backends), the backend were made to respect the quietness of the main Makefile, when -s is poassed on the 'make' command line. In doing so, they were all made to be verbose by default.

However, the verbosity of some of the tools, like scp, is very high, and is in fact intended for debug purposes.

Drop being verbose by default, just use whatever each tool deems normal output. Only respect the quietness requested by the user.

---
Change v1 -> v2:
- fix all backends, not just scp

Quoted 8 lines
---
 support/download/bzr  | 2 +-
 support/download/cp   | 5 +++++
 support/download/git  | 2 +-
 support/download/hg   | 2 +-
 support/download/scp  | 2 +-
 support/download/wget | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com