Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647940 - "emerge --search" fails to find a package when provided with an exact match, $CAT/$PKG
Summary: "emerge --search" fails to find a package when provided with an exact match, ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 651804
  Show dependency tree
 
Reported: 2018-02-17 11:41 UTC by Robert Bridge
Modified: 2020-08-16 21:30 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Bridge 2018-02-17 11:41:50 UTC
When searching with an exact package match, for example to see the package description/license/homepage, portage returns no applications found.

Reproducible: Always

Steps to Reproduce:
1. emerge --search screen
2. (oh dear, that's a long list)
3. emerge --search "app-misc/screen" (or app-vim/screen)
Actual Results:  
# emerge --search app-misc/screen
  
[ Results for search key : app-misc/screen ]
Searching...

[ Applications found : 0 ]


Expected Results:  
*  app-misc/screen
      Latest version available: 4.4.0
      Latest version installed: [ Not Installed ]
      Size of files: 827 KiB
      Homepage:      https://www.gnu.org/software/screen/
      Description:   screen manager with VT100/ANSI terminal emulation
      License:       GPL-2
Comment 1 Zac Medico gentoo-dev 2018-02-17 18:22:28 UTC
You need to search for "@app-misc/screen" in order to match the category. This is documented in the emerge man page.

I think we could remove the requirement to use @, since the presence of a / character implies that there is a category.
Comment 3 Larry the Git Cow gentoo-dev 2018-02-19 19:20:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7a6099f046a0c1f7d45751daf13c1e68253878aa

commit 7a6099f046a0c1f7d45751daf13c1e68253878aa
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-02-18 21:19:39 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-02-19 19:18:24 +0000

    emerge --search: use slash to auto-detect category (bug 647940)
    
    Since search strings containing a slash do no work unless category
    match mode is enabled, use slash to auto-detect category match mode,
    so that users do not have to prefix the search string with the special
    @ symbol.
    
    Bug: https://bugs.gentoo.org/647940
    Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
    Reviewed-by: M. J. Everitt <m.j.everitt@iee.org>

 pym/_emerge/search.py | 4 ++++
 1 file changed, 4 insertions(+)}
Comment 4 Zac Medico gentoo-dev 2018-07-02 18:44:07 UTC
Fixed in portage-2.3.40-r1.