Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196535 - [Feature request] Ability to auto-apply user-provided patches in src_unpack
Summary: [Feature request] Ability to auto-apply user-provided patches in src_unpack
Status: RESOLVED DUPLICATE of bug 189018
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-20 15:09 UTC by Bernd Steinhauser
Modified: 2007-10-20 15:43 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Steinhauser 2007-10-20 15:09:49 UTC
I recently had a few compiling failures with some packages, which could be easily fixed by adding a patch to the ebuild. So what (of course) I do is, I copy the ebuild to an overlay and add the necessary stuff to apply to patch.

Then it came to my mind, that there could be an easy way to make this a lot easier.
Portage could read a variable in make.conf $PATCHDIR, in which it search for patches for the current ebuild.
For example it first looks in 
$PATCHDIR/category/${PN}/
for patches named [NNNN-]${PN}-*.patch (NNNN to provide the ability to select patches, that should be applied first). Then it looks in
$PATCHDIR/category/${PN}/SLOT
for patches named [NNNN-]${PN}-*.patch, then in
$PATCHDIR/category/${PN}/SLOT/${PV}
for patches named [NNNN-]${P}-*.patch and after that, it sorts patches after there prefix NNNN (if provided, with [] I mean, that it should be optional) and applies them automatically at the end of src_unpack.

For example this could also be useful for the kernel sources. I currently have three patches, which I apply to the kernel sources after I emerged them. With this ability I could just place them in one of the directories and they would automatically be applied.

Are there problems with this, other than the implementation (which I guess isn't that trivial)?
The only problem, that I thought of is that those files in $PATCHDIR aren't listed in the manifest and don't have digests. Is that problem a blocker?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-20 15:19:06 UTC
See Bug 189018 please, you can use /etc/portage/bashrc for this.


*** This bug has been marked as a duplicate of bug 189018 ***
Comment 2 Bernd Steinhauser 2007-10-20 15:43:15 UTC
(In reply to comment #1)
> See Bug 189018 please, you can use /etc/portage/bashrc for this.
> 

Hm, why didn't I find this one?

Thanks.