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

Bug 79224

Summary: equery doesn't work when running "equery size --bytes foo" (at least); a fix proposed.
Product: Portage Development Reporter: Vladimir Gritsenko <vladimir.gritsenko>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: VERIFIED FIXED    
Severity: minor CC: soulse
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vladimir Gritsenko 2005-01-23 08:54:48 UTC
As mentioned in the summary, it complained (see below). I looked in the source, was pretty easy to fix. Not sure if it's on every box (a certain person commented about it on IRC; I discovered that my own box has this problem). The fix is to change line 735 in /usr/bin/equery to this:

sz = pp.number(str(size)) + " bytes"

(Notice that the pp. module prefix was droped from the orignal line, resulting in a failed lookup, while in other portions of the program it's called as pp.number().)

Reproducible: Always
Steps to Reproduce:
1. in the console, type: equery size --bytes python
Actual Results:  
[ Searching for packages matching python... ]
* size of dev-lang/python-2.3.4 ]
           Total files : 2615
Traceback (most recent call last):
  File "/usr/bin/equery", line 1551, in ?
    cmd.perform(local_opts)
  File "/usr/bin/equery", line 735, in perform
    sz = number(str(size)) + " bytes"
NameError: global name 'number' is not defined

Expected Results:  
* size of dev-lang/python-2.3.4 ]
           Total files : 2615
           Total size  : 31541085 bytes
Comment 1 Paul Varner (RETIRED) gentoo-dev 2005-09-16 13:37:39 UTC
Fix is in gentoolkit-0.2.1*
Comment 2 Paul Varner (RETIRED) gentoo-dev 2006-01-17 19:28:30 UTC
Fix is in gentoolkit-0.2.1
Comment 3 Vladimir Gritsenko 2006-02-22 12:03:00 UTC
I am truly lagging behind life... thanks!