pkg_preinst() { [...] use pam && pam_epam_expand "${D}"/etc/pam.d/login } as per PMS specification, this is illegal. You cannot use ${D} in pkg_*, it breaks binpkgs. Reproducible: Always
Next time bump the ebuild revision, please! *** This bug has been marked as a duplicate of bug 458548 ***
(In reply to comment #0) your diagnosis is wrong. $D is valid in pkg_preinst.