Patch to get over setupterm fiasco under a later version of Debian GNU/Linux. draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Sat, 09 Nov 2019 10:59:50 +0900
changeset 81062 e78fd22c9457e24c787382e1e890b48f8c6b3c4a
parent 81061 9587b2455257f7889199c296aebcaf29bea4689b
child 81063 7a6ed8d4c68b2ca7f30bdb4f4452d126fec9568c
push id9744
push userishikawa@yk.rim.or.jp
push dateSat, 09 Nov 2019 02:01:06 +0000
treeherdertry-comm-central@56c83244ac0e [default view] [failures only]
Patch to get over setupterm fiasco under a later version of Debian GNU/Linux.
mozilla-M-C-000-setupter-fix.patch
new file mode 100644
--- /dev/null
+++ b/mozilla-M-C-000-setupter-fix.patch
@@ -0,0 +1,29 @@
+# HG changeset patch
+# User ISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
+# Parent  ba563f823a564dfade0327d003143d765ac9ab59
+Patch to get over setupterm fiasco under a later version of Debian GNU/Linux.
+
+diff --git a/third_party/python/blessings/blessings/__init__.py b/third_party/python/blessings/blessings/__init__.py
+--- a/third_party/python/blessings/blessings/__init__.py
++++ b/third_party/python/blessings/blessings/__init__.py
+@@ -89,16 +89,20 @@ class Terminal(object):
+                                  if stream_descriptor is None
+                                  else stream_descriptor)
+         if self.does_styling:
+             # Make things like tigetstr() work. Explicit args make setupterm()
+             # work even when -s is passed to nosetests. Lean toward sending
+             # init sequences to the stream if it has a file descriptor, and
+             # send them to stdout as a fallback, since they have to go
+             # somewhere.
++            # CI: force kind to 'xterm'
++            print ("kind=%s" % kind)
++            print ("environ.get('TERM', 'unknown')=%s" % environ.get('TERM', 'unknown'))
++            print ("environ.get('TERM', 'linux')=%s" % environ.get('TERM', 'linux'))
+             setupterm(kind or environ.get('TERM', 'unknown'),
+                       self._init_descriptor)
+ 
+         self.stream = stream
+ 
+     # Sugary names for commonly-used capabilities, intended to help avoid trips
+     # to the terminfo man page and comments in your code:
+     _sugar = dict(