Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198491 - Portage output contains spurious carriage returns
Summary: Portage output contains spurious carriage returns
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2007-11-08 21:32 UTC by Ulrich Müller
Modified: 2007-11-23 04:01 UTC (History)
0 users

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


Attachments
Unset opost attribute for slave pty (portage.py.patch,528 bytes, patch)
2007-11-08 21:36 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2007-11-08 21:32:37 UTC
When calling "ebuild" from within ebuild-mode in Emacs I noticed that the output contains spurious carriage returns:

 * checking miscfile checksums ;-) ...                                   [ ok ]
 * checking gentoo-syntax-1.7.tar.bz2 ;-) ...                            [ ok ]
>>> Unpacking source...^M
>>> Unpacking gentoo-syntax-1.7.tar.bz2 to /var/tmp/portage/app-emacs/gentoo-syntax-1.7/work^M
>>> Source unpacked.^M

It is also seen with "ebuild foo.ebuild unpack | hexdump -C":

000002a0  0a 3e 3e 3e 20 55 6e 70  61 63 6b 69 6e 67 20 67  |.>>> Unpacking g|
000002b0  65 6e 74 6f 6f 2d 73 79  6e 74 61 78 2d 31 2e 37  |entoo-syntax-1.7|
000002c0  2e 74 61 72 2e 62 7a 32  20 74 6f 20 2f 76 61 72  |.tar.bz2 to /var|
000002d0  2f 74 6d 70 2f 70 6f 72  74 61 67 65 2f 61 70 70  |/tmp/portage/app|
000002e0  2d 65 6d 61 63 73 2f 67  65 6e 74 6f 6f 2d 73 79  |-emacs/gentoo-sy|
000002f0  6e 74 61 78 2d 31 2e 37  2f 77 6f 72 6b 0d 0a 3e  |ntax-1.7/work..>|
                                                  ^^
00000300  3e 3e 20 53 6f 75 72 63  65 20 75 6e 70 61 63 6b  |>> Source unpack|
00000310  65 64 2e 0d 0a                                    |ed...|
                   ^^

The output from python itself doesn't contain any CRs, only the output from the bash part is affected.

AFAICS, the reason is that the "spawn" function in portage.py calls "openpty", but then doesn't set any attributes of the slave pty. (Probably Python's openpty should already do this...)
Comment 1 Ulrich Müller gentoo-dev 2007-11-08 21:36:29 UTC
Created attachment 135516 [details, diff]
Unset opost attribute for slave pty

I'm using this since some time. So far I have not noticed any negative side effects.
Comment 2 Zac Medico gentoo-dev 2007-11-09 03:37:26 UTC
Thanks, the patch works well.
Comment 3 Zac Medico gentoo-dev 2007-11-23 03:51:00 UTC
This has been released in 2.1.4_rc1.