From patchwork Thu Jan 1 16:50:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 424893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 3916C14017C for ; Fri, 2 Jan 2015 03:51:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9E8998AEAE; Thu, 1 Jan 2015 16:51:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pbNxY5MOHhX3; Thu, 1 Jan 2015 16:51:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D13B08AEB2; Thu, 1 Jan 2015 16:51:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id F227A1C2970 for ; Thu, 1 Jan 2015 16:50:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EC69E8AE7F for ; Thu, 1 Jan 2015 16:50:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BCWcrEa5pUbz for ; Thu, 1 Jan 2015 16:50:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0C2A38AE73 for ; Thu, 1 Jan 2015 16:50:57 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id z12so5429256wgg.41 for ; Thu, 01 Jan 2015 08:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=04zsdtK9fHxKwoOiEse+fA3wlj2hypOr+Gj6tTc+YKU=; b=U7vBdQ9ghWJVB/zRqqHHKxqAPr6CDhRgcbf2iRJq1sJnhqbi8+4sS90HA24GkCL+Nw gGP/0olBKkIVp1Tlvm4yknsr+c+ferlKTez0dYmiWbpiXMBf4/haeqqxzeAnLj2D+VR9 SiJZVtyb75QCa81wJGZlVZNXVO0qkboLdbD39Xo5wm21BqkIYWLWF0p5vETeskHBbVXo n3375eLXwxNH4+WGxj9bekXyD/GrgwHZC8zRaI8LhjFqLgMKkKBSQ/HfGKJ8b3Sz07sp 6X6ywsq7MCh/rVFnnu4ZfppmQQq6VNVjH92O4p2o3PfYEBEVij914Ojeh3h6z0TCZesD Lg4w== X-Received: by 10.194.23.6 with SMTP id i6mr84616679wjf.26.1420131055701; Thu, 01 Jan 2015 08:50:55 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id b10sm51235881wiw.9.2015.01.01.08.50.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jan 2015 08:50:54 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Thu, 1 Jan 2015 17:50:52 +0100 Message-Id: <70490271dbf1774e87cc5dab1a5e907105afeb62.1420130984.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 2/2 v8] pkg-download: silence downloads if make is silent X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Fabio Porcedda If it is a silent build (make -s -> QUIET=-q) silence all downloads, as well as the check-hash. Only stdout is redirected, stderr is still visible, for errors and warning. Signed-off-by: Fabio Porcedda [yann.morin.1998@free.fr: greatly simplify by simply consigning stdout to oblivion] Signed-off-by: Yann E. MORIN --- package/pkg-download.mk | 8 ++++++++ support/download/dl-wrapper | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package/pkg-download.mk b/package/pkg-download.mk index ba72fc1..9c782fe 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -88,6 +88,7 @@ define DOWNLOAD_GIT $(EXTRA_ENV) $(DL_WRAPPER) -b git \ -o $(DL_DIR)/$($(PKG)_SOURCE) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ @@ -109,6 +110,7 @@ define DOWNLOAD_BZR $(EXTRA_ENV) $(DL_WRAPPER) -b bzr \ -o $(DL_DIR)/$($(PKG)_SOURCE) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ @@ -127,6 +129,7 @@ define DOWNLOAD_CVS $(EXTRA_ENV) $(DL_WRAPPER) -b cvs \ -o $(DL_DIR)/$($(PKG)_SOURCE) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ $(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \ $($(PKG)_DL_VERSION) \ @@ -147,6 +150,7 @@ define DOWNLOAD_SVN $(EXTRA_ENV) $(DL_WRAPPER) -b svn \ -o $(DL_DIR)/$($(PKG)_SOURCE) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ @@ -168,6 +172,7 @@ define DOWNLOAD_SCP $(EXTRA_ENV) $(DL_WRAPPER) -b scp \ -o $(DL_DIR)/$(2) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ '$(call stripurischeme,$(call qstrip,$(1)))' endef @@ -185,6 +190,7 @@ define DOWNLOAD_HG $(EXTRA_ENV) $(DL_WRAPPER) -b hg \ -o $(DL_DIR)/$($(PKG)_SOURCE) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ @@ -206,6 +212,7 @@ define DOWNLOAD_WGET $(EXTRA_ENV) $(DL_WRAPPER) -b wget \ -o $(DL_DIR)/$(2) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ '$(call qstrip,$(1))' endef @@ -222,6 +229,7 @@ define DOWNLOAD_LOCALFILES $(EXTRA_ENV) $(DL_WRAPPER) -b cp \ -o $(DL_DIR)/$(2) \ -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ -- \ $(call stripurischeme,$(call qstrip,$(1))) endef diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper index cced8f6..57a799e 100755 --- a/support/download/dl-wrapper +++ b/support/download/dl-wrapper @@ -24,12 +24,13 @@ main() { local backend output hfile # Parse our options; anything after '--' is for the backend - while getopts :hb:o:H: OPT; do + while getopts :hb:o:H:q OPT; do case "${OPT}" in h) help; exit 0;; b) backend="${OPTARG}";; o) output="${OPTARG}";; H) hfile="${OPTARG}";; + q) exec >/dev/null;; :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; \?) error "unknown option '%s'\n" "${OPTARG}";; esac