Skip to contentSkip to conversation

Disable bitbake command ANSI color output

DISCUSSION [email protected] 2 participants 2 messages May 28, 2024 – May 29, 2024

lore
Share & tools
lore
#0 lore raw

Greetings everyone,

Dummy question, is there a quick way to disable bitbake output color? When we do container build, there is a lot of ANSI color code.

 NOTE: recipe python3-gcovr-native-5.1-r0: task do_autorev_check: Succeeded
...

I was wondering if there is some quick TERM= setting or NO_COLOR env var that can suppress these things.

Thanks,
m.

#1 lore raw
Quoted 8 lines · On 5/29/24 05:31, [email protected] wrote:

Greetings everyone,

Dummy question, is there a quick way to disable bitbake output color? When we do container build, there is a lot of ANSI color code.

  NOTE: recipe python3-gcovr-native-5.1-r0: task do_autorev_check: Succeeded
...

I was wondering if there is some quick TERM= setting or NO_COLOR env var that can suppress these things.

Just checked the codes:

    if color == 'always' or (color == 'auto' and output.isatty() and os.environ.get('NO_COLOR', '') == ''):
        format.enable_color()

I think you set NO_COLOR in env and the color should not be enabled.

e.g.,

NO_COLOR=1 bitbake xxx

Regards,

Qi

Quoted 12 lines

Thanks,
m.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63219): https://lists.yoctoproject.org/g/yocto/message/63219
Mute This Topic: https://lists.yoctoproject.org/mt/106358067/7304865
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-