Here's a version of fixheadtails.eclass that is smaller then the one in portage now. It depends on sed >= 4 for sed -i and checks the status of the disk io that is used to fix the files. It uses it's own functions internally. The ht_fix_file function was modified to skip the grep since the files are explicitly named. It shouldn't hurt to sed the file without checking it with grep and it allows ht_fix_all to call it. cut was replaced with grep -l since that seems to be what it was being used for anyhow. putting the sed in it's own function means we only have to get it right once instead of twice. Should be a drop-in replacement for the existing eclass. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 21068 [details] re-worked fixheadtails.eclass ...and the attachment.
I have no argument with this being included. Please check out the bug: http://bugs.gentoo.org/show_bug.cgi?id=23116 as well as Azarah made some good points about certain examples which wont be caught.
I think this can be closed unless you're still tracking it John.
thanks for your time on this :D