[MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
--------------------------------------+------------------
 Reporter:  ballapete                 |      Owner:
     Type:  defect                    |     Status:  new
 Priority:  Normal                    |  Milestone:
Component:  ports                     |    Version:
 Keywords:  macOS Sierra, GNU Emacs,  |       Port:  port
--------------------------------------+------------------
 When I run `sudo port upgrade outdated` it produces for example this
 output:

 {{{
 --->  Computing dependencies for openssl
 --->  Fetching archive for openssl
 --->  Attempting to fetch openssl-1.0.2k_0.darwin_16.x86_64.tbz2 from
 http://nue.de.packages.macports.org/openssl
 --->  Attempting to fetch openssl-1.0.2k_0.darwin_16.x86_64.tbz2.rmd160
 from http://nue.de.packages.macports.org/openssl
 --->  Installing openssl @1.0.2k_0
 --->  Cleaning openssl
 --->  Computing dependencies for openssl
 --->  Deactivating openssl @1.0.2j_0
 --->  Cleaning openssl
 --->  Activating openssl @1.0.2k_0
 --->  Cleaning openssl
 --->  Updating database of binaries
 --->  Scanning binaries for linking errors
 --->  No broken files found.
 }}}

 The last line is coloured in red – and this colour is the propagated and
 colours prompt, input, and output. See attached screenshot!

--
Ticket URL: <https://trac.macports.org/ticket/53404>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+--------------------------------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  macOS Sierra, GNU Emacs,
      Port:  port       |
------------------------+--------------------------------------
Changes (by ballapete):

 * Attachment "red hering, no – terminal!.png" added.

 Screenshot showing the effects of red colour plus list of active modes in
 GNU Emacs shell buffer

--
Ticket URL: <https://trac.macports.org/ticket/53404>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+--------------------------------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  macOS Sierra, GNU Emacs,
      Port:  port       |
------------------------+--------------------------------------
Changes (by ballapete):

 * Attachment "Colours are back!.png" added.

 Colours are restored when another well programmed application sets a
 colour

--
Ticket URL: <https://trac.macports.org/ticket/53404>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+--------------------------------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  macOS Sierra, GNU Emacs,
      Port:  port       |
------------------------+--------------------------------------

Comment (by ballapete):

 The second screenshot shows once more that the colour setting in the bash
 command line prompt is not able to change the wrong colour port has set. I
 have use actively another programme to normalise the colours. (ec2list is
 some Python script.)

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------
Changes (by raimue):

 * cc: raimue (added)
 * keywords:  macOS Sierra, GNU Emacs, =>
 * component:  ports => base
 * port:  port =>


Comment:

 Please see TicketsKeywordGuidelines.

 This might be caused by the progress bar during scanning. The terminal
 escape sequences used there are not supposed to change color. Which
 terminal emulator is this? What is the value of $TERM?

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------

Comment (by ballapete):

 Replying to [comment:2 raimue]:
 >
 > This might be caused by the progress bar during scanning. The terminal
 escape sequences used there are not supposed to change color. Which
 terminal emulator is this? What is the value of $TERM?

 dumb

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------

Comment (by raimue):

 That answers one part of my question. Is this Terminal.app?

 `TERM=dumb` is not a sane choice. I wonder where this comes from in your
 setup. Usually, it should be `TERM=xterm` or `TERM=xterm-256color`,
 matching the capabilities of the terminal emulator.

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------

Comment (by ballapete):

 Replying to [comment:4 raimue]:
 > That answers one part of my question. Is this Terminal.app?

 No, it's the `*shell* buffer inside `GNU Emacs`.
 >
 > `TERM=dumb` is not a sane choice. I wonder where this comes from in your
 setup. Usually, it should be `TERM=xterm` or `TERM=xterm-256color`,
 matching the capabilities of the terminal emulator.

 Since `GNU Emacs` performs a lot of things inside that buffer it's not
 really efficient when `GNU Emacs` and some thought smart shell try to
 perform nifty things. IMO `GNU Emacs` performs pretty well. If not better
 …

 There is also a more `ANSI conforming` terminal emulation, the `*ansi-term
 buffer*`. Its TERM is set to `eterm-color`. Next week, when some installed
 ports might have been upgraded, I can try to see how this mode performs.

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------

Comment (by ballapete):

 This ansi-term in GNU Emacs is too dumb to be useful… it's just like a
 piece of hardware, allows via bash to scroll in command history, but I
 have no change to insert and execute the contents of macros – and possibly
 it's not possible to work on the contents of this `*ansi-term*` buffer.

 It's ok for those folks who have endless time to achieve something. I'm
 not going to use it.

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------

Comment (by ballapete):

 It behaves quite correct, nothing from this loading bars changed the
 colour. (Was there any colour?)

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+-----------------
  Reporter:  ballapete  |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+-----------------

Comment (by neverpanic):

 The relevant code that implements this is in https://github.com/macports
 /macports-base/blob/master/src/port/port.tcl. I'd merge a patch that fixes
 the behavior for dumb terminals.

 We have Tcllib available, which has some terminal control functions; see
 http://tmml.sourceforge.net/doc/tcllib/index.html#DIVid81bb738. Maybe one
 of those already deals with this correctly and we'd just have to use the
 correct sequences from `::term::ansi::code::attr::*` to make this work?

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+--------------------
  Reporter:  ballapete  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+--------------------

Comment (by ryandesign):

 Has duplicate #61357. So far it seems like this is a problem in emacs, not
 a problem in MacPorts.

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+--------------------
  Reporter:  ballapete  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+--------------------

Comment (by ballapete):

 The problem is handled by GNU Emacs developers here:
 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44118.

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #53404: `port upgrade outdated` changes colours in terminal emulation

macports-4
In reply to this post by macports-4
#53404: `port upgrade outdated` changes colours in terminal emulation
------------------------+--------------------
  Reporter:  ballapete  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+--------------------

Comment (by ballapete):

 The bug in GNU Emacs 28.0.50, i.e. in `port emacs-devel` seems to have
 been fixed. I ran `port -vd upgrade outdated` in GNU Emacs' shell buffer
 and it did not happen that all the text became red. I could observe that
 colour changed for different sort of output from port or other tools till
 the end. It changed forwards and backwards many times.

--
Ticket URL: <https://trac.macports.org/ticket/53404#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS