From: Zac Medico Date: Wed, 18 Oct 2006 09:15:50 +0000 (-0000) Subject: Fix --usepkg --newuse logic so that it doesn't throw a KeyError if there's no matchin... X-Git-Tag: v2.1.2~605 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7ad5b145e7a52a96413dbeb1dc255b6e5ba5996;p=portage.git Fix --usepkg --newuse logic so that it doesn't throw a KeyError if there's no matching ebuild in the tree. svn path=/main/trunk/; revision=4748 --- diff --git a/bin/emerge b/bin/emerge index ea4162d6c..1bc29c916 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1246,7 +1246,10 @@ class depgraph: iuses = set(filter_iuse_defaults( bindb.aux_get(myeb_pkg, ["IUSE"])[0].split())) old_use = bindb.aux_get(myeb_pkg, ["USE"])[0].split() - pkgsettings.setcpv(myeb_pkg, mydb=portdb) + mydb = None + if "--usepkgonly" not in self.myopts and myeb: + mydb = portdb + pkgsettings.setcpv(myeb, mydb=mydb) now_use = pkgsettings["USE"].split() forced_flags = set() forced_flags.update(pkgsettings.useforce)