Add epatch_user to them. This is an extremely annoying bug that must be fixed ASAP. Reproducible: Always Steps to Reproduce: 1. $ cd /usr/portage 2. $ # list all non-virtual ebuilds containing src_prepare not containing epatch_user 2. $ grep -l src_prepare $(grep -L epatch_user `find -regex '.*\.ebuild' -not -regex '\./virtual/.*'`) Actual Results: 11174 lines of output Expected Results: very few lines of output (metapackages)
The following quick'n'dirty python program should do: import re import sys text=sys.stdin.read() match=re.search("src_prepare *\( *\) *{", text) sys.stdout.write(text[:match.end()]) text=text[match.end():] bc=1 for i_,c in enumerate(text): i=i_ if c=='}': bc-=1 if c=='{': bc+=1 if bc==0: sys.stdout.write(" epatch_user\n") break sys.stdout.write(c) sys.stdout.write(text[i:])
I don't think anyone is willing to patch a big set of ebuilds this way. As you're proposing something that affects too many packages, I strongly recommend to organize your thoughts and write an email to gentoo-dev mailing list regarding this. I'm not saying it's a bad idea. (On the other hand, I don't know if we should enable this globally, as there are system packages that users should not play with by patching them in a so simple way). Closing this as WONTFIX for the moment, feel free to reopen if you want but better to mail gentoo-dev.