Hi, portage already knows about the dependencies between *.so files. Yet, it doesn't do the same with *.la files (and the *.a files that belong to them). As a motivation, I want to describe the problem, that I had yesterday: As part of the xorg-x11 upgrade (stable amd64) a new libxcb was installed. The new version came without a libxcb-xlib.la and libxcb-xlib.a. The xorg-upgrade failed at some point. libXaw didn't compile because libtool was missing libxcb-xlib.la which was still references in some other .la files. Now emerge @preserved-rebuild wasn't a big help. It obviously had no idea, that there were plenty of broken *.la files on my system due to the removal of libxcb-xlib.la. revdep-rebuild wasn't a big help either. It noticed that there were many broken *.la files, but it didn't handle the fact, that libxcb-xlib.so was being preserved by portage. Sure, revdep-rebuild could be fixed (is there a new version that handles preserved libraries?), but on the other hand, portage might also handle *.la files. Reproducible: Always Steps to Reproduce:
(In reply to comment #0) > The xorg-upgrade failed at some point. libXaw didn't compile because libtool > was missing libxcb-xlib.la which was still references in some other .la files. In cases like this, a command like `emerge --oneshot --complete-graph $(grep -l libxcb-xlib.la /usr/lib/*.la)` typically helps fix up the breakage. In the long term, many cases like libxcb-xlib.la will gradually resolve themselves since once the files are removed they never come back and therefore they won't cause any more trouble. FEATURES=fixlafiles also helps avoid problems with removed *.la files.
Also, there was a plan to drop .la files by default on upcoming EAPI bumps: https://bugs.gentoo.org/show_bug.cgi?id=357561 but I have not idea about how that it ended finally :/