Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119806 - app-portage/gentoolkit-0.2.2_pre2: internal error in equery
Summary: app-portage/gentoolkit-0.2.2_pre2: internal error in equery
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 212314 (view as bug list)
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2006-01-21 05:18 UTC by Toralf Förster
Modified: 2008-03-04 21:23 UTC (History)
2 users (show)

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


Attachments
equery_catch_list_filenames.diff (equery_catch_list_filenames.diff,669 bytes, patch)
2008-02-18 23:11 UTC, michael@smith-li.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2006-01-21 05:18:06 UTC
yes, it's the wrong syntax, but it shouldn't produce an internal error, isn't it ? Here's what I mean:

n22 ~ # equery --nocolor --quiet list -i /var/www/localhost/htdocs/apache_pb2.gif
!!! Internal portage error, terminating
!!! too many values to unpack
Comment 1 Erik 2006-04-06 23:47:01 UTC
Try gentoolkit-0.2.2_pre4. It does not give that error for me.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-06-21 02:36:11 UTC
Happens here with gentoolkit 0.2.2 (final)
I think it's about number of slashes in the atom

gehinom ~ # equery list a/b
[ Searching for package 'b' in 'a' among: ]
 * installed packages
gehinom ~ # equery list a/b/
!!! Internal portage error, terminating
!!! too many values to unpack
gehinom ~ # equery list a/b/c
!!! Internal portage error, terminating
!!! too many values to unpack
Comment 3 Austen Dicken 2007-05-27 17:18:25 UTC
I've been looking through the equery script and it seems that the error is thrown during package name parsing.

The exact location is line 1282:
(cat, name, ver, rev) = gentoolkit.split_package_name(query)

The problem seems to be that the gentoolkit function split_package_name does not support queries not of the form "(cat(/name(-ver(-rev)?)?)?)?"

Any ideas?
Comment 4 Toralf Förster gentoo-dev 2007-08-20 18:29:11 UTC
app-portage/gentoolkit-0.2.3-r1 seems to have the same behaviour
Comment 5 Roderick B. Greening 2007-09-04 19:05:00 UTC
Same thing with app-portage/gentoolkit-0.2.4_pre6.

equery --nocolor --quiet list -i /var/www/localhost/htdocs/apache_pb2.gif
!!! Internal portage error, terminating
!!! too many values to unpack
Comment 6 Paul Varner (RETIRED) gentoo-dev 2007-10-08 18:46:38 UTC
This bug is not fixed.
Comment 7 michael@smith-li.com 2008-02-18 23:11:37 UTC
Created attachment 143923 [details, diff]
equery_catch_list_filenames.diff

This patch puts some error handling around 

(cat, name, ver, rev) = gentoolkit.split_package_name(query)

that specifically checks for str(ValueError) == 'too many values to unpack' because if gentoolkit.split_package_name(query) returns more than four values it's indicative of a pattern with more than one slash in it, which cannot possibly match any package.
Comment 8 Paul Varner (RETIRED) gentoo-dev 2008-02-18 23:48:22 UTC
$ svn commit -m "Fix equery list to not generate an internal portage error when fed input with too many slashes. (Bug 119806)"
Sending        equery/equery
Transmitting file data .
Committed revision 470.
Comment 9 Paul Varner (RETIRED) gentoo-dev 2008-02-21 01:51:37 UTC
Released in gentoolkit-0.2.4_rc2
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2008-03-04 21:23:27 UTC
*** Bug 212314 has been marked as a duplicate of this bug. ***