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

Bug 180079

Summary: Problem with emerge --search "" (error)
Product: Gentoo Linux Reporter: phrexianreaper
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 181949    
Attachments: fix the KeyError and allow an empty string to match all packages

Description phrexianreaper 2007-05-28 01:08:32 UTC
When a search is run via emerge --search with "" for the last argument, a traceback is received. Doing the same with emerge --search with no other arguments returns a no search term found message.

Reproducible: Always

Steps to Reproduce:
1.emerge --search ""
2.???
3.???

Actual Results:  
error/traceback

Expected Results:  
a search for nothing/everything.


emerge --search ""
Searching...   
Traceback (most recent call last):
  File "/usr/bin/emerge", line 5530, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5506, in emerge_main
    myopts, myfiles, spinner)
  File "/usr/bin/emerge", line 4604, in action_search
    searchinstance.execute(mysearch)
  File "/usr/bin/emerge", line 399, in execute
    if self.searchkey[0] == '%':
IndexError: string index out of range
Comment 1 Zac Medico gentoo-dev 2007-05-28 07:13:46 UTC
Created attachment 120499 [details, diff]
fix the KeyError and allow an empty string to match all packages

Thanks, this is fixed in svn r6649.
Comment 2 Zac Medico gentoo-dev 2007-05-31 01:29:11 UTC
This has been released in 2.1.2.9.