Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835134 - sys-apps/portage: escaped newline character sequences appearing in output
Summary: sys-apps/portage: escaped newline character sequences appearing in output
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-14 12:36 UTC by Stuart Shelton
Modified: 2022-03-14 15:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2022-03-14 12:36:36 UTC
For many releases now, when running 'emerge' via a 'screen' session (although I doubt this is related?), certain output lacks coloured output and includes escaped newline character sequences:

ebuild sys-devel/binutils/binutils-2.37_p1-r2.ebuild prepare
 * binutils-2.37_p1.tar.xz BLAKE2B SHA512 size ;-) … [ ok ]
 * binutils-2.37_p1-patches-2.tar.xz BLAKE2B SHA512 size ;-) … [ ok ]
 * checking ebuild checksums ;-) … [ ok ]
 * checking auxfile checksums ;-) … [ ok ]
>>> Unpacking source...
>>> Unpacking binutils-2.37_p1.tar.xz to /var/tmp/portage/sys-devel/binutils-2.37_p1-r2/work
>>> Unpacking binutils-2.37_p1-patches-2.tar.xz to /var/tmp/portage/sys-devel/binutils-2.37_p1-r2/work
>>> Source unpacked in /var/tmp/portage/sys-devel/binutils-2.37_p1-r2/work
>>> Preparing source in /var/tmp/portage/sys-devel/binutils-2.37_p1-r2/work/binutils-2.37 ...
 * Applying binutils patchset 2.37_p1-2
 * Applying patches from /var/tmp/portage/sys-devel/binutils-2.37_p1-r2/work/patch ...
 *   0001-GOLD-PowerPC64-relocation-overflow-for-Os-register-s.patch … [ ok ]
 *   0002-Revert-AArch64-MTE-corefile-support.patch … [ ok ]
 *   0003-PR28391-strip-objcopy-preserve-dates-.a-cannot-set-t.patch … [ ok ]
 *   0004-GOLD-Got_offset_list-addend-field.patch … [ ok ]
 *   0005-GOLD-Remove-addend-from-Local_got_entry_key.patch … [ ok ]
 *   0006-GOLD-Output_data_got-tidy.patch … [ ok ]
 *   0007-GOLD-Output_data_got-create-entry-method-addends.patch … [ ok ]
 *   0008-GOLD-Got_entry-write-addends.patch … [ ok ]
 *   0009-GOLD-PowerPC64-support-for-sym-addend-GOT-entries.patch … [ ok ]
 *   0010-ld-pru-Fix-resource_table-output-section-alignment.patch … [ ok ]
 *   0011-PR28422-build_id-use-after-free.patch … [ ok ]
 *   0012-PR28459-readelf-issues-bogus-warning.patch … [ ok ]
 *   0013-GOLD-PowerPC64-Don-t-pretend-to-support-multi-toc.patch … [ ok ]
 *   0014-GOLD-Two-GOT-sections-for-PowerPC64.patch … [ ok ]
 *   0015-GOLD-Re-PowerPC64-Don-t-pretend-to-support-multi-toc.patch … [ ok ]
 *   0016-Re-PR27625-powerpc64-gold-__tls_get_addr-calls.patch … [ ok ]
 *   0017-PR28417-std-string-no-longer-allows-accepting-nullpt.patch … [ ok ]
 *   0018-PR28523-ld.bfd-created-undefined-symbols-on-ppc64.patch … [ ok ]
 *   0019-PR28540-segmentation-fault-on-NULL-byte_get.patch … [ ok ]
 *   0020-gold-Place-.note.gnu.property-section-before-other-n.patch … [ ok ]
 *   0021-Waddress-warning-in-ldelf.c.patch … [ ok ]
 *   9999-Gentoo-We-make-a-release.patch … [ ok ]
 * Done.
 * Fixing misc issues in configure files
 * Using GNU config files from /usr/share/gnuconfig
 *   Updating config.sub [ ok ]
 *   Updating config.guess [ ok ]
 * Running elibtoolize in: binutils-2.37/\n *   Applying portage/2.2 patch ...\n *   Applying sed/1.5.6 patch ...\n *   Applying as-needed/2.2.6 patch ...\n * Running elibtoolize in: binutils-2.37/bfd/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/binutils/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/etc/\n * Running elibtoolize in: binutils-2.37/gas/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/gold/\n * Running elibtoolize in: binutils-2.37/gprof/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/intl/\n * Running elibtoolize in: binutils-2.37/ld/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/libctf/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/libiberty/\n * Running elibtoolize in: binutils-2.37/opcodes/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...\n * Running elibtoolize in: binutils-2.37/zlib/\n *   Applying target-nm/2.4.2 patch ...\n *   Applying ppc64le/2.4.4 patch ...
>>> Source prepared.

… noting that the initial asterisks in the usual output are coloured green, but on the line starting 'Running elibtoolize in' they are uncoloured.

I've only seen this happen with sys-devel/gcc and sys-devel/binutils, and in both instances the output starts with 'Running elibtoolize in', although this string doesn't appear to exist in eclass/libtool.eclass.

The same issue with escaped newline character sequences appearing unfiltered can also be observed when running 'locale-get', so it may not be entirely portage-specific.

Reproducible: Always

Steps to Reproduce:
1. 'emerge -v binutils' or 'emerge -v gcc' (or 'locale-gen')
Actual Results:  
'\n' character sequences appear in monochromatic output, lines aren't split for formatting is wrong.

Expected Results:  
No escaped character sequences output to console, working colourisation.

'\n' is output as a literal new-line, and coloured output is maintained.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-14 12:37:56 UTC
I don't see this behaviour. What's your TERM?
Comment 2 Stuart Shelton 2022-03-14 13:52:36 UTC
```
$ echo $TERM
screen-256color
```