Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 782655 - [Feature Request] sys-apps/portage: Add 'userpatches' feature
Summary: [Feature Request] sys-apps/portage: Add 'userpatches' feature
Status: RESOLVED DUPLICATE of bug 669704
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-13 10:08 UTC by konsolebox
Modified: 2021-11-02 12:26 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Adds 'userpatches' feature (userpatches-feature.diff,1.34 KB, patch)
2021-04-13 10:10 UTC, konsolebox
Details | Diff
Correction on condition (userpatches-feature-v2.diff,1.34 KB, patch)
2021-04-13 10:27 UTC, konsolebox
Details | Diff
Document FEATURES=userpatches in make.conf(5) (makeconf_manual_userpatches_feature.diff,1.38 KB, patch)
2021-04-29 12:30 UTC, Robin Couto
Details | Diff
Document FEATURES=userpatches in make.conf(5) (makeconf_manual_userpatches_feature.diff,1.38 KB, patch)
2021-04-29 13:03 UTC, Robin Couto
Details | Diff
Updated to work with 3.0.28 (portage-3.0.28-userpatches.patch,1.39 KB, patch)
2021-10-29 06:22 UTC, konsolebox
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description konsolebox 2021-04-13 10:08:21 UTC
This FEATURES flag would determine if user patches would be installed or not. Please see attached patch.

Reproducible: Always
Comment 1 konsolebox 2021-04-13 10:10:02 UTC
Created attachment 699660 [details, diff]
Adds 'userpatches' feature
Comment 2 konsolebox 2021-04-13 10:27:47 UTC
Created attachment 699663 [details, diff]
Correction on condition
Comment 3 Robin Couto 2021-04-29 12:28:55 UTC
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.
Comment 4 Robin Couto 2021-04-29 12:30:04 UTC
Created attachment 703890 [details, diff]
Document FEATURES=userpatches in make.conf(5)
Comment 5 Robin Couto 2021-04-29 13:03:08 UTC
Created attachment 703893 [details, diff]
Document FEATURES=userpatches in make.conf(5)

don't begin a plaintext line with '.', sigh
Comment 6 konsolebox 2021-05-16 15:36:15 UTC
(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.
Comment 7 konsolebox 2021-10-29 06:22:01 UTC
Created attachment 747180 [details, diff]
Updated to work with 3.0.28
Comment 8 konsolebox 2021-10-29 06:31:13 UTC
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
Comment 9 Ulrich Müller gentoo-dev 2021-10-30 07:51:42 UTC
Why would anyone put patches in /etc/portage/patches/ but at the same time disable them globally with a feature flag?
Comment 10 Robin Couto 2021-10-30 12:33:59 UTC
(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.
Comment 11 konsolebox 2021-11-02 11:18:21 UTC
(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.
Comment 12 Ulrich Müller gentoo-dev 2021-11-02 12:26:22 UTC

*** This bug has been marked as a duplicate of bug 669704 ***