Some ChangeLogs have entries without a version, for example when the ebuild is changed without updating the version: $ head /usr/portage/media-video/dvbcut/ChangeLog # ChangeLog for media-video/dvbcut # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/media-video/dvbcut/ChangeLog,v 1.17 2009/03/08 17:22:13 aballier Exp $ 08 Mar 2009; Alexis Ballier <aballier@gentoo.org> +files/dvbcut-0.5.4-open.patch, dvbcut-0.5.4-r1.ebuild: fix build with fortify source 19 Oct 2008; Alexis Ballier <aballier@gentoo.org> +files/dvbcut-0.5.4-scons.patch, dvbcut-0.5.4-r1.ebuild: This can occasionally cause a traceback in equery changes: $ equery c dvbcut Traceback (most recent call last): File "/usr/bin/equery", line 32, in <module> equery.main() File "/usr/lib/python2.6/site-packages/gentoolkit/equery/__init__.py", line 394, in main loaded_module.main(module_args) File "/usr/lib/python2.6/site-packages/gentoolkit/equery/changes.py", line 318, in main indexed_entries = index_changelog(log_entries) File "/usr/lib/python2.6/site-packages/gentoolkit/equery/changes.py", line 138, in index_changelog (VersionMatch(op="=", ver=pkg_split[1], rev=pkg_split[2]), entry)) TypeError: 'NoneType' object is unsubscriptable The attached patch handles this exception.
Created attachment 190782 [details, diff] Make sure we don't traceback when entries don't have a version header
Thanks to billie_80 on Freenode for pointing this out to me.
(In reply to comment #2) > Thanks to billie_80 on Freenode for pointing this out to me. > With the patch the traceback disappears but when doing for instance "equery c dvbcut" it returns absolutely nothing which might irritate the user a bit. Maybe an informational message or something should be printed in this case.
(In reply to comment #3) > With the patch the traceback disappears but when doing for instance "equery c > dvbcut" it returns absolutely nothing which might irritate the user a bit. > Maybe an informational message or something should be printed in this case. > Or falling back to the -l option for displaying the latest entry.
(In reply to comment #4) > (In reply to comment #3) > > With the patch the traceback disappears but when doing for instance "equery c > > dvbcut" it returns absolutely nothing which might irritate the user a bit. > > Maybe an informational message or something should be printed in this case. > > > > Or falling back to the -l option for displaying the latest entry. > Try it with the patch in 269175 and let me know if that fixes the problem, because I couldn't duplicate your behavior. $ svn revert changes.py Reverted 'changes.py' dja@vault equery $ patch -p0 < /development/patches/gentoolkit-changes-entrywithoutversion.patch patching file changes.py dja@vault equery $ equery c dvbcut *dvbcut-0.5.4-r1 (18 Oct 2007) 18 Oct 2007; Matthias Schwarzott <zzam@gentoo.org> +files/dvbcut-0.5.4-ffmpeg-compat3.patch, +dvbcut-0.5.4-r1.ebuild: Fix compilation against newest ffmpeg, Bug #188184. Added desktop menu entry, Bug #188579. 03 Jun 2007; Alexis Ballier <aballier@gentoo.org> -files/dvbcut-0.5.3-ac3-buffer.patch, -files/dvbcut-0.5.3-sconstruct.patch, -dvbcut-0.5.3-r1.ebuild: Cleanup old version 01 Jun 2007; Alexis Ballier <aballier@gentoo.org> +files/dvbcut-0.5.4-ffmpeg-compat2.patch, +files/dvbcut-0.5.4-gcc42.patch, dvbcut-0.5.4.ebuild: Fix compilation against newest ffmpeg, bug #180547, also remove long time deprecated max c++ syntax that has been removed in gcc 4.2 dja@vault equery $ equery c gibberish !!! Try using an unversioned query with --from and --to. !!! No packages matching 'gibberish'
(In reply to comment #5) > > Try it with the patch in 269175 and let me know if that fixes the problem, > because I couldn't duplicate your behavior. > I found the problem, it has nothing to do with bug 269175. You can reproduce it if you copy the dvbcut directory from the portage tree to an overlay. In this case you will get no output from "equery c dvbcut" which is a bit strange. If there is no Changelog in the overlay at all something similar to bug 1 from http://code.google.com/p/genscripts/issues/detail?id=1 happens where metadata.xml was missing in the package from the overlay "equery m dvbcut" has returned "!!! No metadata available." I get the same now with the Changelog missing in the overlay. When I do "equery c dvbcut" I get "!!! /media/system/repositories/portage-billie/media-video/dvbcut/ChangeLog does not exist or is unreadable". So it should also switch back to the Changelog of the in tree ebuild if there is any like for the metadata.xml. I often do testing in my overlay where i don't bother to include metadata.xml or the Changelog.
Created attachment 190853 [details, diff] Handle more cases, such as empty package name, empty ChangeLog file, or ChangeLog file with no version to match This patch improves handling of the following cases: 1) ChangeLog exists but doesn't contain any version to match. Solution is to print the first entry, same as equery c --latest: dja@vault ~ $ equery c i3 26 Apr 2009; Andre-Patrick Bubel (moredread) <code@andre-bubel.de> +i3-3a.ebuild, +metadata.xml: New Ebuild for bug 267476 thanks to chithead, Ken69267, idl0r, Tommy[D] 2) ChangeLog exists but is unreadable: dja@vault ~ $ sudo touch /usr/local/portage/layman/genscripts/app-portage/emeta/ChangeLog dja@vault ~ $ equery c emeta !!! Fatal error: /usr/local/portage/layman/genscripts/app-portage/emeta/ChangeLog exists but doesn't contain entries. 3) This patch includes the improvements from the obsoleted patch.
*** Bug 272739 has been marked as a duplicate of this bug. ***
Released in gentoolkit-0.3.0_rc7