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...
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
$ 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.
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
$ 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.
Created attachment 163574 [details, diff] gentoolkit.232599.patch Corrected patch
Released in gentoolkit-0.2.4_rc6