Hello. If I call `eshowkw --arch=x86-linux portage` or any other arch that has `-` in its name, I get a crash like this: $ eshowkw --arch=x86-linux portage Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/eshowkw", line 9, in <module> sys.exit(emain(sys.argv[1:])) File "/usr/lib64/python3.4/site-packages/gentoolkit/eshowkw/__init__.py", line 103, in main keywords = keywords_header(prefix, highlight_arch, order) File "/usr/lib64/python3.4/site-packages/gentoolkit/eshowkw/keywords_header.py", line 176, in __init__ max([len(x) for x in self.keywords]), ValueError: max() arg is an empty sequence Please fix. Reproducible: Always
I've tried putting arch inside quotes, but it doesn't help.
I mistakenly CC'ed vapier, but he's in charge of portage-utils, not gentoolkit. Sorry.
Does 'eshowkw -P --arch=x86-linux portage' work? If so, an easy way to fix this should be to make the option "--arch" imply the option "-P".
(In reply to Felix Janda from comment #3) > Does 'eshowkw -P --arch=x86-linux portage' work? If so, an easy way to > fix this should be to make the option "--arch" imply the option "-P". Yes. It works properly this way. Thanks for the tip!
This has been fixed to not require the -P flag in the following commit: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=99bdbe3d832a3dabb7e9fb9c50cb9c4e1baf2f02 I agree that --arch should imply -P as the user is specifying the architecture and it should just be displayed regardless of prefix status. You can test the changes with app-portage/gentoolkit-9999 and the bug will be resolved when it is released in a new ebuild.
(In reply to Paul Varner from comment #5) > This has been fixed to not require the -P flag in the following commit: > https://gitweb.gentoo.org/proj/gentoolkit.git/commit/ > ?id=99bdbe3d832a3dabb7e9fb9c50cb9c4e1baf2f02 > > I agree that --arch should imply -P as the user is specifying the > architecture and it should just be displayed regardless of prefix status. > > You can test the changes with app-portage/gentoolkit-9999 and the bug will > be resolved when it is released in a new ebuild. I can confirm that this change resolves the problem for me. Thank you very much.
This change has unintended side effects. Now if I call `eshowkw atom` the output is like if I was calling `eshowkw -P atom`. I am sure this isn't the desired behaviour in most situation. Please adjust this back to normal if possible.
I have fixed the fix to be correct. I accidentally used the wrong variable in the first patch. I double checked both use cases and they appear to be working correctly now. https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=e4dda3ef193b109f30051f5a116158dfe23922bb