From: Zac Medico Date: Wed, 22 Nov 2006 13:01:11 +0000 (-0000) Subject: Fix a KeyError in emerge --info when there is no matching ebuild in the tree... X-Git-Tag: v2.1.2~431 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f361d47a0095736c3a8b099fa3dec60a342be9fe;p=portage.git Fix a KeyError in emerge --info when there is no matching ebuild in the tree. Thanks to Bo Ørsted Andresen for reporting. svn path=/main/trunk/; revision=5118 --- diff --git a/bin/emerge b/bin/emerge index 9f3d38670..92c5b98fe 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3792,7 +3792,13 @@ def action_info(settings, trees, myopts, myfiles): valuesmap["IUSE"] = set(filter_iuse_defaults(valuesmap["IUSE"])) valuesmap["USE"] = valuesmap["USE"].intersection(valuesmap["IUSE"]) pkgsettings.reset() - pkgsettings.setcpv(pkg, mydb=portdb) + # If a matching ebuild is no longer available in the tree, maybe it + # would make sense to compare against the flags for the best + # available version with the same slot? + mydb = None + if portdb.cpv_exists(pkg): + mydb = portdb + pkgsettings.setcpv(pkg, mydb=mydb) if valuesmap["IUSE"].intersection(pkgsettings["USE"].split()) != \ valuesmap["USE"]: diff_values["USE"] = valuesmap["USE"]