Bug 127922 - [jhbuild] Disable escape sequences in EWS output
Summary: [jhbuild] Disable escape sequences in EWS output
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
Depends on:
Reported: 2014-01-30 10:36 PST by Csaba Osztrogonác
Modified: 2017-09-12 06:47 PDT (History)
7 users (show)

See Also:

Patch (2.36 KB, patch)
2014-01-30 10:53 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (2.30 KB, patch)
2014-01-30 11:15 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (3.26 KB, patch)
2014-01-30 12:55 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2014-01-30 10:36:08 PST
discussion on webkit-dev:


The root of the problem is that jhbuild's output contains VT100 escape sequences.
I checked it and I think we can avoid it with setting TERM variable anything
different from xterm and rxvt. But we should do it for EWS bots only from
somewhere in webkitpy.
Comment 1 Csaba Osztrogonác 2014-01-30 10:50:36 PST
I tried a hack locally, added the following line to
disable_gcc_smartquotes() in environment.py:
self.env['TERM'] = 'none'

And then "webkit-patch build" doesn't generate 
escape sequences for me during jhbuild run.
Comment 2 Csaba Osztrogonác 2014-01-30 10:53:51 PST
Created attachment 222687 [details]

patch for EWS, it should fail only on EFL
Comment 3 Csaba Osztrogonác 2014-01-30 11:15:57 PST
Created attachment 222692 [details]
Comment 4 Csaba Osztrogonác 2014-01-30 11:19:52 PST
Comment on attachment 222692 [details]

clear r?, because it broke a webkitpy unit test :(
I'm going to fix it tomorrow morning.
Comment 5 Csaba Osztrogonác 2014-01-30 12:55:58 PST
Created attachment 222715 [details]
Comment 6 Alexey Proskuryakov 2014-01-30 17:02:33 PST
Comment on attachment 222715 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=222715&action=review

> Tools/Scripts/webkitpy/common/system/environment.py:45
> +        # or rxvt, which makes webkit-queues server set wrong MIME type.

Correction, it's not happening in webkit-queues server, it's in browser (CFNetwork framework in Safari case, and I don't even know if other browsers are affected).

Also, the escape sequences would be harmful even if they didn't affect MIME type, because it's just garbage when viewed in browser.
Comment 7 Csaba Osztrogonác 2014-01-31 02:49:01 PST
Landed in http://trac.webkit.org/changeset/163167 after I corrected the comment.
Comment 8 Carlos Alberto Lopez Perez 2017-09-12 06:47:07 PDT
FTR ... I'm going to propose to change TERM=none to TERM=dumb in bug 176761

TERM=none is invalid. In the case of JHBuild it disables VT100 codes. But it doesn't work with other programs like tput or GCC colored format.

TERM=dumb is valid and tells the terminal control code to disable any VT100 output. It disables JHBuild color codes as well as GCC color format or any other program that relies on tput or similar. Check : https://en.wikipedia.org/wiki/Computer_terminal#Dumb_terminals

$ TERM=xterm tput bold|xxd
00000000: 1b5b 316d                                .[1m

$ TERM=none tput bold|xxd
tput: unknown terminal "none"

$ TERM=dumb tput bold|xxd

# nothing ^