Bug 127922

Summary: [jhbuild] Disable escape sequences in EWS output
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: clopez, commit-queue, glenn, gyuyoung.kim, oliver, ossy, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=176761
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Csaba Osztrogonác 2014-01-30 10:36:08 PST
discussion on webkit-dev:

https://lists.webkit.org/pipermail/webkit-dev/2014-January/026137.html
https://lists.webkit.org/pipermail/webkit-dev/2014-January/026140.html


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

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]
Patch
Comment 4 Csaba Osztrogonác 2014-01-30 11:19:52 PST
Comment on attachment 222692 [details]
Patch

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]
Patch
Comment 6 Alexey Proskuryakov 2014-01-30 17:02:33 PST
Comment on attachment 222715 [details]
Patch

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 ^