This FEATURES flag would determine if user patches would be installed or not. Please see attached patch. Reproducible: Always
Created attachment 699660 [details, diff] Adds 'userpatches' feature
Created attachment 699663 [details, diff] Correction on condition
Yes, please. I needed something exactly like this somewhat recently. USE=-fontforge when emerging media-fonts/dejavu changes the SRC_URI and unpacks .ttf instead of editable .sfd, so I had to move the naturally failing patches out of the way and go again. I imagined a FEATURES switch would be really nice but I didn't realize it could be this simple. Am I correct in supposing that this will also work when EAPI=5 and patches are being applied in/by bashrc? I wrote a bit for the manual, mostly copying the comment from the same function in phase-helpers.sh, so here's another patch. Without being sure what verbosity is appropriate, I did appreciate that comment being the one place I ever heard about the x-supersedes-y part, unlike the wiki, so I kept it and tried to clarify it. Tips and nitpicks are welcome.
Created attachment 703890 [details, diff] Document FEATURES=userpatches in make.conf(5)
Created attachment 703893 [details, diff] Document FEATURES=userpatches in make.conf(5) don't begin a plaintext line with '.', sigh
(In reply to Mr. Robin Couto from comment #3) > Am I correct in supposing that this will also work when EAPI=5 and patches > are being applied in/by bashrc? It probably would work as long as eapply_user is being used.
Created attachment 747180 [details, diff] Updated to work with 3.0.28
After the last patch failed with 3.0.28, I decided to create my own modified copy of the ebuild which includes these patches. The unofficial features can be enabled by enabling the 'unofficial' use flag. https://github.com/konsolebox/overlay/tree/master/sys-apps/portage
Why would anyone put patches in /etc/portage/patches/ but at the same time disable them globally with a feature flag?
(In reply to Ulrich Müller from comment #9) > Why would anyone put patches in /etc/portage/patches/ but at the same time > disable them globally with a feature flag? They would not. I leave it alone until I need to temporarily install something without them, for testing or troubleshooting, also without moving /etc/portage/patches/category/something and needing to put it back later.
(In reply to Ulrich Müller from comment #9) > Why would anyone put patches in /etc/portage/patches/ but at the same time > disable them globally with a feature flag? Not globally in my case. Just `FEATURES=-userpatches ebuild ... prepare`. My best example use case for this is when examining bash's source code where I need the official patches applied but my custom patches excluded. Many times I would do this when a patch fails to apply in newer versions, but I can also make use of it when I'm debugging bash. FYI this isn't the first time this request has been asked. See https://bugs.gentoo.org/669704.
*** This bug has been marked as a duplicate of bug 669704 ***