When portage works on /var/lib/portage/config, it easily marks it (SELinux-wise) as portage_cache_t. However, this should be ldconfig_cache_t as it is ldconfig that works on it, and there is no reason for portage to have it as portage_cache_t. We need to figure out which domain is writing this file and see if it can either use setfscreate() to use the proper context (and patch the policies to use the proper context) or, if plausible, update the policy with a named file transition on it. Reproducible: Always
So I was wrong, this is not about ldconfig_cache_t.