Only call calc_changelog if there is an installed version in the same slot.
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Dec 2006 20:39:51 +0000 (20:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Dec 2006 20:39:51 +0000 (20:39 -0000)
svn path=/main/trunk/; revision=5185

bin/emerge

index 119b5d5103b44a05da2a3fc5651a250d4a83ced7..a4e29e9c6a8043767a88e3a33c3868dc39b9fec4 100755 (executable)
@@ -1931,9 +1931,11 @@ class depgraph:
                                        if "--changelog" in self.myopts:
                                                slot_atom = "%s:%s" % (portage.dep_getkey(pkg_key),
                                                        mydbapi.aux_get(pkg_key, ["SLOT"])[0])
-                                               changelogs.extend(self.calc_changelog(
-                                                       portdb.findname(pkg_key),
-                                                       vardb.match(slot_atom)[0], pkg_key))
+                                               inst_matches = vardb.match(slot_atom)
+                                               if inst_matches:
+                                                       changelogs.extend(self.calc_changelog(
+                                                               portdb.findname(pkg_key),
+                                                               inst_matches[0], pkg_key))
                                else:
                                        addl=" "+green("N")+" "+fetch+"  "
                                        counters.new += 1