From patchwork Sun Feb 21 15:40:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Knight X-Patchwork-Id: 585821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 9BB0A140180 for ; Mon, 22 Feb 2016 02:46:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8A6AE91DEB; Sun, 21 Feb 2016 15:46:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RWvvDpWUrsvS; Sun, 21 Feb 2016 15:46:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id AA28B8C6B3; Sun, 21 Feb 2016 15:46:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 8738C1C0975 for ; Sun, 21 Feb 2016 15:46:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 819C5956D0 for ; Sun, 21 Feb 2016 15:46:14 +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 Fe55hRgRBhzd for ; Sun, 21 Feb 2016 15:46:13 +0000 (UTC) X-Greylist: delayed 00:05:15 by SQLgrey-1.7.6 Received: from BLU004-OMC2S33.hotmail.com (blu004-omc2s33.hotmail.com [65.55.111.108]) by hemlock.osuosl.org (Postfix) with ESMTPS id EFC46956EC for ; Sun, 21 Feb 2016 15:46:12 +0000 (UTC) Received: from BLU436-SMTP63 ([65.55.111.71]) by BLU004-OMC2S33.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sun, 21 Feb 2016 07:40:56 -0800 X-TMN: [zugCuoi0Qf//FQDdDf1TMHgPcX01UmB8] X-Originating-Email: [james.d.knight@live.com] Message-ID: From: James Knight To: buildroot@buildroot.org Date: Sun, 21 Feb 2016 10:40:49 -0500 X-Mailer: git-send-email 1.9.5.msysgit.1 X-OriginalArrivalTime: 21 Feb 2016 15:40:56.0094 (UTC) FILETIME=[4105CBE0:01D16CBE] MIME-Version: 1.0 Cc: James Knight Subject: [Buildroot] [PATCH 1/1] pkg-utils: mask tput failure for non-interactive sessions 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When invoking a build from a non-interactive session (for example, a Jenkins build), there is no terminal session to modify. When preparing variables to track the bold and boldoff mode sequences, the `tput` command will always fail as there is no terminal to query. The following change masks the error message when `tput` fails; leaving the TERM_BOLD and TERM_RESET variables empty. Signed-off-by: James Knight Acked-by: "Yann E. MORIN" --- package/pkg-utils.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 44bd2c9..12447fc 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -84,8 +84,8 @@ suitable-extractor = $(INFLATE$(suffix $(1))) # MESSAGE Macro -- display a message in bold type MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)" -TERM_BOLD := $(shell tput smso) -TERM_RESET := $(shell tput rmso) +TERM_BOLD := $(shell tput smso 2> /dev/null) +TERM_RESET := $(shell tput rmso 2> /dev/null) # Utility functions for 'find' # findfileclauses(filelist) => -name 'X' -o -name 'Y'