Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 736828 - Strange chars in the build log
Summary: Strange chars in the build log
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-12 06:42 UTC by Agostino Sarubbo
Modified: 2020-08-12 07:21 UTC (History)
0 users

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 Agostino Sarubbo gentoo-dev 2020-08-12 06:42:16 UTC
I have the following as /etc/portage/bashrc:

function pre_pkg_setup() {
        echo -ne "\n\nemerge --info:\n$( emerge --info )\n\n" >> /var/tmp/portage/"${CATEGORY}"/"${PF}"/temp/build.log
}

It produces something like:
"]0;emerge]0;root@:~"

Example: https://736826.bugs.gentoo.org/attachment.cgi?id=654246

IS there a way to avoid this behavior?
Comment 1 Zac Medico gentoo-dev 2020-08-12 07:02:34 UTC
The echo -e is not appropriate for arbitrary emerge --info output. Here's a way to avoid it:

function pre_pkg_setup() {
    {
        echo -ne '\n\nemerge --info:'
        emerge --info
        echo -ne '\n\n'
    } &>> /var/tmp/portage/"${CATEGORY}"/"${PF}"/temp/build.log
}
Comment 2 Agostino Sarubbo gentoo-dev 2020-08-12 07:21:26 UTC
perfect, it works for me! thanks