From 64742b0c9ae62534ceec5a15baf29417980c0836 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 2218d34ce30b..63e0475e363f 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -140,8 +140,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 @@ -165,7 +165,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 9169fb57794710fdb5f7153dd51fc13b8e3df51b 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 20f61528d14c..57ef45a7d5dd 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