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-188.8.131.527::gentoo (masked by: exclude option)
- sci-geosciences/googleearth-184.108.40.2064::gentoo (masked by: exclude option)
- sci-geosciences/googleearth-220.127.116.118::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
File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6006, in display_problems
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
File "/usr/lib64/portage/pym/portage/util/digraph.py", line 144, in parent_nodes
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 18.104.22.168.