I was trying to do "emerge @preserved-rebuild --exclude=googleearth" (since it keep re-emerging it despite that it won't help), and it throws a KeyError exception: # emerge -pv @preserved-rebuild --exclude=googleearth These are the packages that would be merged, in order: Calculating dependencies... done! !!! All ebuilds that could satisfy "sci-geosciences/googleearth:0" have been masked. !!! One of the following masked packages is required to complete your request: - sci-geosciences/googleearth-6.0.3.2197::gentoo (masked by: exclude option) - sci-geosciences/googleearth-6.0.2.2074::gentoo (masked by: exclude option) - sci-geosciences/googleearth-5.2.1.1588::gentoo (masked by: exclude option) - sci-geosciences/googleearth-5.1.3535.3218-r1::gentoo (masked by: exclude option) Traceback (most recent call last): File "/usr/bin/emerge", line 43, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 1907, in emerge_main myopts, myaction, myfiles, spinner) File "/usr/lib64/portage/pym/_emerge/actions.py", line 302, in action_build mydepgraph.display_problems() File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6006, in display_problems self._show_unsatisfied_dep(*pargs, **kwargs) File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3147, in _show_unsatisfied_dep dep_chain = self._get_dep_chain(myparent, atom) File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 2643, in _get_dep_chain if self._dynamic_config.digraph.parent_nodes(node): File "/usr/lib64/portage/pym/portage/util/digraph.py", line 144, in parent_nodes return list(self.nodes[node][1]) KeyError: <_emerge.SetArg.SetArg object at 0xfc13110> I tested this with another set with a single package, then tried emerging that set, excluding that package, and got the same result. The expected behavior would be to just say there are no packages to install. Although I put a specific version in the summary line, I did not test this with previous versions, so I don't know when this bug was introduced.
Created attachment 277255 [details, diff] fix the KeyError Save as /tmp/keyerror.patch and apply as follows: patch /usr/lib/portage/pym/_emerge/depgraph.py /tmp/keyerror.patch
Yes, that patch seems to fix it for me. Thanks.
Thanks for testing. This is in 2.2.0_alpha42, but I'll leave this bug open until it's in an unmasked release.
This is fixed in 2.1.10.4.