public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] git-r3.eclass: Remove SGR control sequences from messages.
@ 2019-12-14 11:29 Ulrich Müller
  2019-12-14 12:12 ` Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Müller @ 2019-12-14 11:29 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]

These prevent NOCOLOR in make.conf or emerge --color=n from working
correctly, and may also be problematic for accessibility.

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 eclass/git-r3.eclass | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index e0d2bbb5edc0..144236c6ac38 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -227,19 +227,19 @@ _git-r3_env_setup() {
 			;;
 		single)
 			if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
-				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
+				einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting"
 				EGIT_CLONE_TYPE=single
 			fi
 			;;
 		single+tags)
 			if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
-				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
+				einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting"
 				EGIT_CLONE_TYPE=single+tags
 			fi
 			;;
 		mirror)
 			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
-				einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
+				einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
 				EGIT_CLONE_TYPE=mirror
 			fi
 			;;
@@ -439,7 +439,7 @@ _git-r3_set_submodules() {
 			done
 
 			if [[ ! ${res} ]]; then
-				einfo "Skipping submodule \e[1m${subname}\e[22m"
+				einfo "Skipping submodule ${subname}"
 				continue
 			fi
 		fi
@@ -658,7 +658,7 @@ git-r3_fetch() {
 	fi
 	for r in "${repos[@]}"; do
 		if [[ ! ${EVCS_OFFLINE} ]]; then
-			einfo "Fetching \e[1m${r}\e[22m ..."
+			einfo "Fetching ${r} ..."
 
 			local fetch_command=( git fetch "${r}" )
 			local clone_type=${EGIT_CLONE_TYPE}
@@ -892,7 +892,7 @@ git-r3_checkout() {
 	local -x GIT_DIR
 	_git-r3_set_gitdir "${repos[0]}"
 
-	einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
+	einfo "Checking out ${repos[0]} to ${out_dir} ..."
 
 	if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
 		die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
@@ -1042,7 +1042,7 @@ git-r3_peek_remote_ref() {
 
 	local r success
 	for r in "${repos[@]}"; do
-		einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
+		einfo "Peeking ${remote_ref} on ${r} ..." >&2
 
 		local lookup_ref
 		if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
@@ -1098,9 +1098,9 @@ git-r3_pkg_needrebuild() {
 	[[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
 
 	if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
-		einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
+		einfo "Update from ${EGIT_VERSION} to ${new_commit_id}"
 	else
-		einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
+		einfo "Local and remote at ${EGIT_VERSION}"
 	fi
 
 	[[ ${EGIT_VERSION} != ${new_commit_id} ]]
-- 
2.24.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] [PATCH] git-r3.eclass: Remove SGR control sequences from messages.
  2019-12-14 11:29 [gentoo-dev] [PATCH] git-r3.eclass: Remove SGR control sequences from messages Ulrich Müller
@ 2019-12-14 12:12 ` Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2019-12-14 12:12 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 3288 bytes --]

On Sat, 2019-12-14 at 12:29 +0100, Ulrich Müller wrote:
> These prevent NOCOLOR in make.conf or emerge --color=n from working
> correctly, and may also be problematic for accessibility.
> 
> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
> ---
>  eclass/git-r3.eclass | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
> index e0d2bbb5edc0..144236c6ac38 100644
> --- a/eclass/git-r3.eclass
> +++ b/eclass/git-r3.eclass
> @@ -227,19 +227,19 @@ _git-r3_env_setup() {
>  			;;
>  		single)
>  			if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
> -				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
> +				einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting"
>  				EGIT_CLONE_TYPE=single
>  			fi
>  			;;
>  		single+tags)
>  			if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
> -				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
> +				einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting"
>  				EGIT_CLONE_TYPE=single+tags
>  			fi
>  			;;
>  		mirror)
>  			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
> -				einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
> +				einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
>  				EGIT_CLONE_TYPE=mirror
>  			fi
>  			;;
> @@ -439,7 +439,7 @@ _git-r3_set_submodules() {
>  			done
>  
>  			if [[ ! ${res} ]]; then
> -				einfo "Skipping submodule \e[1m${subname}\e[22m"
> +				einfo "Skipping submodule ${subname}"
>  				continue
>  			fi
>  		fi
> @@ -658,7 +658,7 @@ git-r3_fetch() {
>  	fi
>  	for r in "${repos[@]}"; do
>  		if [[ ! ${EVCS_OFFLINE} ]]; then
> -			einfo "Fetching \e[1m${r}\e[22m ..."
> +			einfo "Fetching ${r} ..."
>  
>  			local fetch_command=( git fetch "${r}" )
>  			local clone_type=${EGIT_CLONE_TYPE}
> @@ -892,7 +892,7 @@ git-r3_checkout() {
>  	local -x GIT_DIR
>  	_git-r3_set_gitdir "${repos[0]}"
>  
> -	einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
> +	einfo "Checking out ${repos[0]} to ${out_dir} ..."
>  
>  	if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
>  		die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
> @@ -1042,7 +1042,7 @@ git-r3_peek_remote_ref() {
>  
>  	local r success
>  	for r in "${repos[@]}"; do
> -		einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
> +		einfo "Peeking ${remote_ref} on ${r} ..." >&2
>  
>  		local lookup_ref
>  		if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
> @@ -1098,9 +1098,9 @@ git-r3_pkg_needrebuild() {
>  	[[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
>  
>  	if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
> -		einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
> +		einfo "Update from ${EGIT_VERSION} to ${new_commit_id}"
>  	else
> -		einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
> +		einfo "Local and remote at ${EGIT_VERSION}"
>  	fi
>  
>  	[[ ${EGIT_VERSION} != ${new_commit_id} ]]

Sure.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-14 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-14 11:29 [gentoo-dev] [PATCH] git-r3.eclass: Remove SGR control sequences from messages Ulrich Müller
2019-12-14 12:12 ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox