Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 12168

Summary: bounds checking, return value checking
Product: Portage Development Reporter: mccary
Component: UnclassifiedAssignee: Nicholas Jones (RETIRED) <carpaski>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-2.0.45-r5.patch

Description mccary 2002-12-14 19:54:04 UTC
brady@brady brady $ emerge 
/usr/portage/net-im/gaim-cvs/gaim-cvs-0.60-r2.ebuild -p 
 
These are the packages that I would merge, in order. 
 
Calculating dependencies ...done! 
[ebuild  N   ] dev-util/pkgconfig-0.12.0  
[ebuild    U ] dev-libs/glib-2.0.7 [1.2.10-r5] 
[ebuild  N   ] dev-python/pexpect-0.94  
[ebuild  N   ] x11-libs/pango-1.0.5  
[ebuild  N   ] dev-libs/atk-1.0.3-r1  
[ebuild    U ] x11-libs/gtk+-2.0.8 [1.2.10-r9] 
[blocks B    ] net-im/gaim (from pkg net-im/gaim-cvs-0.60-r2) 
Traceback (most recent call last): 
  File "/usr/bin/emerge", line 1707, in ? 
    mydepgraph.display(mydepgraph.altlist()) 
  File "/usr/bin/emerge", line 1010, in display 
    if mysplit[0]=="sys-apps/portage": 
TypeError: unsubscriptable object 
brady@brady brady $  
 
cardoe says he sees what the problem is. 
 
-brady
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2002-12-14 20:06:41 UTC
Created attachment 6509 [details]
emerge-2.0.45-r5.patch

Here's the patch to fix the problem and confirmed to work by brady. It looks
bigger then it is because I moved the tabs over a little. The main thing is the
first + line. Basically pkgsplit returns None when it doesn't find anything
which is a scalar and the code treats the return value to be an array always..
Just check if it's a scalar and we're good to go.
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2002-12-14 23:13:43 UTC
What is the value of x[2] that causes this?
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2002-12-15 15:26:50 UTC
I dunno. I just noticed that the return value from pkgsplit is not properly
checked and fixed that.
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2002-12-15 17:55:34 UTC
ok