Summary: | "etcat -v mldonkey" fails and gives Traceback error | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Jean-Marc Coic <jean-marc.coic_gen> |
Component: | Tools | Assignee: | Portage Tools Team <tools-portage> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | andre.hinrichs, greg_g |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Jean-Marc Coic
2004-03-29 07:46:29 UTC
This happens because mldonkey is ambiguous: when etcat produces the list of the package names/versions to display, it finds something like app-emacs/mldonkey-0.0.2a net-p2p/mldonkey-2.5.4 net-p2p/mldonkey-2.5.11 ... Then etcat tries to compare the versions of those packages, but since comparison of packages that have different categories/names is not allowed, it gives the backtrace. in /usr/bin/etcat, there's some code to deal with the "ambiguous package" case, which is: except ValueError, e: if type(e[0]) == types.ListType: print red("!!!"), "Ambiguous package name \"%s\"" % query print red("!!!"), "Please use one of the following long names:" for p in e[0]: print red("!!!"), " "+p But this is never executed because in gentoolkit.py the "ambiguous package" exception is explicitly catched, so that having a list of packages that is ambiguous is not a problem. One solution could be to avoid catching that exception, so that lines 187-202 in gentoolkit.py look like the following: # try: if masked: t=portage.portdb.xmatch("match-all", search_key) else: t=portage.portdb.match(search_key) # catch the "amgigous package" Exception # except ValueError, e: # if type(e[0]) == types.ListType: # t=[] # for cp in e[0]: # if masked: # t += portage.portdb.xmatch("match-all",$# else: # t += portage.portdb.match(cp) # else: # raise ValueError(e) Another solution could be to allow comparison of versions from different packages. *** Bug 48476 has been marked as a duplicate of this bug. *** changed the comparison function so it returns sys.maxint instead of None I've just noticed that "etcat -v readline" still gives this error. Should the fix have made it into portage and/or gentoolkit yet? Still an issue? I don't use etcat at all... Yes, it is still an issue! But don't know why? emerge handles such cases in the right way, but etcat doesn't. Output is still as reported. I'm not familiar with python, but it should be easy to copy the idea from emerge to etcat, shouldn't it? Here is, what emerge says... # emerge -p ocaml These are the packages that I would merge, in order: Calculating dependencies !!! The short ebuild name "ocaml" is ambiguous. Please specify !!! one of the following fully-qualified ebuild names instead: app-xemacs/ocaml dev-lang/ocaml this tool is deprecated |