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

Bug 372033

Summary: sys-apps/portage suggests non-existing packages
Product: Gentoo Linux Reporter: Samuli Suominen <ssuominen>
Component: Current packagesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: minor Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 373933    

Description Samuli Suominen gentoo-dev 2011-06-17 12:15:13 UTC
See first comment of bug 371947:

"emerge: Maybe you meant any of these: kde-base/kttsd, net-dns/totd,
kde-base/kscd?"

Where kde-base/kttsd is directory without any .ebuild files.

Then Portage shouldn't suggest it as an alternative...
Comment 1 Zac Medico gentoo-dev 2011-06-17 19:22:14 UTC
Given that the directory containing no ebuilds is a mistake in need of correction, I think we can safely neglect this case at the level of the emerge suggestions. Otherwise, we'll have to add some listdir calls which are totally redundant when the tree it in the "correct" state.

It was also mentioned on irc that it suggests installed packages that are no longer in the tree. However, I think this is acceptable, since we're trying to predict what the user intended to type, which does not necessarily correspond to a package which is currently available to install.
Comment 2 Zac Medico gentoo-dev 2011-06-17 22:03:16 UTC
I've made it a bit smarter here, by ensuring that it doesn't suggest kttsd when kttsd was given as the input:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cbe44d92ff13b8a22f5b4215b73078ce600c6bf4
Comment 3 Zac Medico gentoo-dev 2011-06-17 22:10:52 UTC
(In reply to comment #1)
> It was also mentioned on irc that it suggests installed packages that are no
> longer in the tree.

This is actually handled in latest portage versions by skipping the suggestions entirely:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1afde255d556a904148e3ee77c5e82589161ccc5
Comment 4 Zac Medico gentoo-dev 2011-07-03 17:33:29 UTC
This is fixed in 2.1.10.4.