I have installed lots of packages. When I try emerge -epv world, emerge crashes after printing list of packages to install. Reproducible: Always Steps to Reproduce: 1.Install lots of packages 2.emerge -epv 3.emerge -epv stops! Actual Results: Traceback (most recent call last): File "/usr/bin/emerge", line 2578, in ? mydepgraph.display(mydepgraph.altlist()) File "/usr/bin/emerge", line 1374, in display print "Total size of downloads: "+format_size(totalsize) TypeError: cannot concatenate 'str' and 'long' objects Expected Results: ... [ebuild N ] dev-games/kyra-2.0.7 +doc +opengl 1,947 kB Total size of downloads: 2,495,198 kB envia root # Let's see format_size in /usr/bin/emerge... def format_size(mysize): if type(mysize) != types.IntType: return mysize mystr=str(mysize/1024) mycount=len(mystr) while (mycount > 3): mycount-=3 mystr=mystr[:mycount]+","+mystr[mycount:] return mystr+" kB" Since I installed a lot, mysize became a long. And format_size returned long (mysize). long and string cannot be concatenated! LINE 1374 print "Total size of downloads: "+format_size(totalsize) So format_size should handle long. Here's my fix. ---- --- /usr/bin/emerge 2004-03-14 21:51:45.000000000 +0900 +++ emerge 2004-03-14 21:50:34.302455288 +0900 @@ -320,7 +320,7 @@ # formats a size given in bytes nicely def format_size(mysize): - if type(mysize) != types.IntType: + if type(mysize) != types.IntType and type(mysize) != types.LongType: return mysize mystr=str(mysize/1024) mycount=len(mystr) ---- Happy Hacking!
Already fixed in CVS a few days ago :)
Closing (it's fixed in .51). Still an issue in .50, although there is another bug open about it.