For an automatic parsing it helps if a postinst error is formatted in the same way as every other portage phase fail, emost portage errors do have something like (which can be parsed fine): * ERROR: media-libs/audiofile-0.3.6-r3::gentoo failed (test phase): * Make check failed. See above for details. whilst today I get something like: * The following 2 packages have failed to build, install, or execute * postinst: * * (net-nds/openldap-2.4.49-r1:0/0::gentoo, ebuild scheduled for merge) (postinst failed), Log file: