summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-22 13:01:11 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-22 13:01:11 +0000
commitf361d47a0095736c3a8b099fa3dec60a342be9fe (patch)
treeb4d76c5632d376693edea2c874149192b6882881 /bin
parentReally fix bit mask support when preserving S_ISUID and S_ISGID in apply_perm... (diff)
downloadportage-multirepo-f361d47a0095736c3a8b099fa3dec60a342be9fe.tar.gz
portage-multirepo-f361d47a0095736c3a8b099fa3dec60a342be9fe.tar.bz2
portage-multirepo-f361d47a0095736c3a8b099fa3dec60a342be9fe.zip
Fix a KeyError in emerge --info <pkg> when there is no matching ebuild in the tree. Thanks to Bo Ørsted Andresen <bo.andresen@zlin.dk> for reporting.
svn path=/main/trunk/; revision=5118
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/emerge b/bin/emerge
index 9f3d3867..92c5b98f 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"]