From 958d650cb9c4773379fc5528a08095d0cf082681 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 fdc0c5eedd92..3592a1a3a3c8 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 95b2c63b4a797fd961c66ae4e784463456ae93d5 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 1d19de54ae80..c9935644f4c8 100644 --- a/common/xbps-src/shutils/build_dependencies.sh +++ b/common/xbps-src/shutils/build_dependencies.sh @@ -405,22 +405,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