commit:     47fb9590b57162a786d668f663c1d0dfbfd1cfb0
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Nov 19 22:00:00 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Nov 19 23:55:08 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=47fb9590

eapply_user(): Add message about applying user patches and minor decoration.

Bug: https://bugs.gentoo.org/825066
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/phase-helpers.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 94f4f24f2..6a078caad 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -1139,6 +1139,10 @@ if ___eapi_has_eapply_user; then
 
                local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches
 
+               local columns=${COLUMNS:-0}
+               [[ ${columns} == 0 ]] && columns=$(set -- $( ( stty size 
</dev/tty ) 2>/dev/null || echo 24 80 ) ; echo $2)
+               (( columns > 0 )) || (( columns = 80 ))
+
                local applied d f
                local -A _eapply_user_patches
                local prev_shopt=$(shopt -p nullglob)
@@ -1170,6 +1174,11 @@ if ___eapi_has_eapply_user; then
                        while read -r -d '' f; do
                                f=${_eapply_user_patches[${f}]}
                                if [[ -s ${f} ]]; then
+                                       if [[ -z ${applied} ]]; then
+                                               einfo 
"${PORTAGE_COLOR_INFO}$(for ((column = 0; column < ${columns} - 3; column++)); 
do echo -n =; done)${PORTAGE_COLOR_NORMAL}"
+                                               einfo "Applying user patches 
from ${basedir} ..."
+                                       fi
+
                                        eapply "${f}"
                                        applied=1
                                fi
@@ -1179,7 +1188,10 @@ if ___eapi_has_eapply_user; then
 
                ${prev_shopt}
 
-               [[ -n ${applied} ]] && ewarn "User patches applied."
+               if [[ -n ${applied} ]]; then
+                       einfo "User patches applied."
+                       einfo "${PORTAGE_COLOR_INFO}$(for ((column = 0; column 
< ${columns} - 3; column++)); do echo -n =; done)${PORTAGE_COLOR_NORMAL}"
+               fi
        }
 fi
 

Reply via email to