Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229233 - portage-2.2.00.10760 python colourisation errors
Summary: portage-2.2.00.10760 python colourisation errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High minor (vote)
Assignee: Gentoo non-Linux Team
URL: http://thread.gmane.org/gmane.linux.g...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 17:00 UTC by Stuart Shelton
Modified: 2008-06-26 16:49 UTC (History)
1 user (show)

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


Attachments
convert to str to avoid TypeError (arg_to_str.patch,614 bytes, patch)
2008-06-24 21:20 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2008-06-24 17:00:15 UTC
With portage-2.2.00.10760, when I run emerge I often see:

Traceback (most recent call last):
  File "/opt/portage/usr/bin/emerge", line 20, in <module>
    retval = _emerge.emerge_main()
  File "/opt/portage/usr/lib/portage/pym/_emerge/__init__.py", line 9525, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/opt/portage/usr/lib/portage/pym/_emerge/__init__.py", line 8795, in action_build
    mydepgraph.display_problems()
  File "/opt/portage/usr/lib/portage/pym/_emerge/__init__.py", line 5247, in display_problems
    msg.append("  %s%s\n" % (colorize("INFORM", arg), ref_string))
  File "/opt/portage/usr/lib/portage/pym/portage/output.py", line 304, in colorize
    return codes[color_key] + text + codes["reset"]
TypeError: cannot concatenate 'str' and 'Atom' objects

... but this doesn't happen every time.  I thought it was only when the "-p" flag was used, but even this doesn't seem consistent.
Comment 1 Fabian Groffen gentoo-dev 2008-06-24 17:04:30 UTC
The same seems to happen on 10770 for some people.  darkside thinks it is related to the file being in the world-file or not.  I'm clueless on this one for now.

Maybe the Portage gurus have a clue on this one.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-06-24 20:14:44 UTC
(In reply to comment #1)
> The same seems to happen on 10770 for some people.  darkside thinks it is
> related to the file being in the world-file or not.  I'm clueless on this one
> for now.

Background: I wanted to add gcc:4.2 to the world file so emerge --depclean wouldn't remove it. So, I ran: emerge -av --noreplace gcc:4.2 and then I get the same traceback as comment #0. emerge -av --noreplace --color=n gcc:4.2 works and then --color=y works because gcc:4.2 is already in the world file. Not sure what this has to do with it but..there you have it. I can reproduce this traceback with regularity, so let me know if you need anything.

Stuart: A valid work around is to add --color=n to default opts or to the command line.

Comment 3 Zac Medico gentoo-dev 2008-06-24 21:20:12 UTC
Created attachment 158325 [details, diff]
convert to str to avoid TypeError

This is in trunk r10771.
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-06-25 20:04:30 UTC
Confirmed..r10785 fixes my issue.
Comment 5 Fabian Groffen gentoo-dev 2008-06-26 16:49:02 UTC
10788 is in the tree, should be fixed now, thanks!