Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232599 - gentoolkit-0.2.4_rc5 - error in gentoolkit.helpers.split_package_name
Summary: gentoolkit-0.2.4_rc5 - error in gentoolkit.helpers.split_package_name
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2008-07-21 21:31 UTC by René 'Necoro' Neumann
Modified: 2008-08-27 16:07 UTC (History)
0 users

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


Attachments
gentoolkit.232599.patch (gentoolkit.232599.patch,474 bytes, patch)
2008-07-22 18:31 UTC, Paul Varner (RETIRED)
Details | Diff
gentoolkit.232599.patch (gentoolkit.232599.patch,301 bytes, patch)
2008-08-22 21:17 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description René 'Necoro' Neumann 2008-07-21 21:31:10 UTC
When using gentoolkit-0.2.4_rc5 in combination with portage-2.2, 'equery depends ">gnome-python-2.10"' fails with:

Traceback (most recent call last):
  File "/usr/bin/equery", line 1805, in <module>
    cmd.perform(local_opts)
  File "/usr/bin/equery", line 1140, in perform
    isdepend = gentoolkit.split_package_name(query)
  File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 141, in split_package_name
    r[0] = ''
TypeError: 'tuple' object does not support item assignment

The problem is, that portage.catpkgsplit returns a tuple in portage-2.2 -- but the function in gentoolkit still tries to use it as a list as in portage-2.1...
Comment 1 Paul Varner (RETIRED) gentoo-dev 2008-07-22 18:31:53 UTC
Created attachment 161118 [details, diff]
gentoolkit.232599.patch

Patch to fix gentoolkit.split_package_name.  Assuming the patch is named gentoolkit.232599.patch, it can be applied by doing the following as root.

1. cd /usr/lib/gentoolkit/pym/gentoolkit
2. patch < gentoolkit.232599.patch
Comment 2 Paul Varner (RETIRED) gentoo-dev 2008-07-22 18:32:26 UTC
$ svn commit -m "Fix gentoolkit.split_package_name to work with newer portage.catpkgsplit that now returns a tuple instead of a list. (Bug 232599)" src/gentoolkit/helpers.py ChangeLog
Sending        ChangeLog
Sending        src/gentoolkit/helpers.py
Transmitting file data ..
Committed revision 501.
Comment 3 René 'Necoro' Neumann 2008-08-01 22:18:53 UTC
note that this patch on its own leads to another issue, if catpkgsplit returns None:

Traceback (most recent call last):
  File "/usr/bin/equery", line 1805, in <module>
    cmd.perform(local_opts)
  File "/usr/bin/equery", line 1140, in perform
    isdepend = gentoolkit.split_package_name(query)
  File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 133, in split_package_name
    r = list(portage.catpkgsplit(name))
TypeError: 'NoneType' object is not iterable
Comment 4 Paul Varner (RETIRED) gentoo-dev 2008-08-22 21:15:17 UTC
$ svn commit -m "Fix gentoolkit.split_package_name to work when portage.catpkgsplit returns None" helpers.py
Sending        helpers.py
Transmitting file data .
Committed revision 506.
Comment 5 Paul Varner (RETIRED) gentoo-dev 2008-08-22 21:17:43 UTC
Created attachment 163574 [details, diff]
gentoolkit.232599.patch

Corrected patch
Comment 6 Paul Varner (RETIRED) gentoo-dev 2008-08-27 16:07:12 UTC
Released in gentoolkit-0.2.4_rc6