Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] pkg-utils: mask tput failure for non-interactive sessions
Date: Sun, 21 Feb 2016 16:56:00 +0100	[thread overview]
Message-ID: <20160221155600.GC3456@free.fr> (raw)
In-Reply-To: <BLU436-SMTP6377F2EEAE54E32A4A6DDDA0A20@phx.gbl>

James, All,

On 2016-02-21 10:40 -0500, James Knight spake thusly:
> 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 <james.d.knight@live.com>
> ---
>  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)

No space between 2> and /dev/null, please:  2>/dev/null

Otherwise:

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  # Utility functions for 'find'
>  # findfileclauses(filelist) => -name 'X' -o -name 'Y'
> -- 
> 1.9.5.msysgit.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

      reply	other threads:[~2016-02-21 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-21 15:40 [Buildroot] [PATCH 1/1] pkg-utils: mask tput failure for non-interactive sessions James Knight
2016-02-21 15:56 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160221155600.GC3456@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox