From e624e13105dfcb6fbb768fb140ea4af248c19f39 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Sun, 19 Feb 2023 22:02:40 -0500 Subject: [PATCH 1/2] common/xbps-src/shutils/common.sh: ensure white text in msg_normal Most terminals see '1m' as being a "bright colour" modifier, but others consider it to be the "bold font" modifier, like the GitHub Actions log. '97m' is a standalone "bright white" that is supported in most terminals, including GitHub Actions, and is ignored where not supported. By prefixing the "bold" modifier with "bright white", we ensure that the message shows as intended on as many terminals as possible. Normal messages will be bright white on most terminals, with bolding depending on terminal configuration. Where 97m is not supported, only 1m will have an effect. --- common/xbps-src/shutils/common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 04247942decf2..6e625a169600a 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -176,8 +176,8 @@ msg_warn_nochroot() { msg_normal() { if [ -z "$XBPS_QUIET" ]; then - # normal messages in bold - [ -n "$NOCOLORS" ] || printf "\033[1m" + # normal messages in bright bold white + [ -n "$NOCOLORS" ] || printf "\033[97m\033[1m" printf "=> $@" [ -n "$NOCOLORS" ] || printf "\033[m" fi @@ -201,7 +201,7 @@ report_broken() { } msg_normal_append() { - [ -n "$NOCOLORS" ] || printf "\033[1m" + [ -n "$NOCOLORS" ] || printf "\033[97m\033[1m" printf "$@" [ -n "$NOCOLORS" ] || printf "\033[m" } From 51ce4004408f965fc3aeedd6c93d2c7e80cd079c Mon Sep 17 00:00:00 2001 From: 0x5c Date: Sun, 19 Feb 2023 22:44:09 -0500 Subject: [PATCH 2/2] common/xbps-src/shutils/build_dependencies.sh: convert to msg_normal There remained two locations where the functionality of msg_normal was manually implemented. --- common/xbps-src/shutils/build_dependencies.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh index 20f61528d14c2..57ef45a7d5dd4 100644 --- a/common/xbps-src/shutils/build_dependencies.sh +++ b/common/xbps-src/shutils/build_dependencies.sh @@ -410,22 +410,12 @@ install_pkg_deps() { done if [[ ${host_binpkg_deps} ]]; then - if [ -z "$XBPS_QUIET" ]; then - # normal messages in bold - [[ $NOCOLORS ]] || printf "\033[1m" - echo "=> $pkgver: installing host dependencies: ${host_binpkg_deps[@]} ..." - [[ $NOCOLORS ]] || printf "\033[m" - fi + msg_normal "$pkgver: installing host dependencies: ${host_binpkg_deps[*]} ...\n" install_pkg_from_repos "" host "${host_binpkg_deps[@]}" fi if [[ ${binpkg_deps} ]]; then - if [ -z "$XBPS_QUIET" ]; then - # normal messages in bold - [[ $NOCOLORS ]] || printf "\033[1m" - echo "=> $pkgver: installing target dependencies: ${binpkg_deps[@]} ..." - [[ $NOCOLORS ]] || printf "\033[m" - fi + msg_normal "$pkgver: installing target dependencies: ${binpkg_deps[*]} ...\n" install_pkg_from_repos "$cross" target "${binpkg_deps[@]}" fi