Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140583 - automatically apply local patches
Summary: automatically apply local patches
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-15 19:11 UTC by Mark Tiefenbruck
Modified: 2006-07-17 04:56 UTC (History)
0 users

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


Attachments
bashrc.autopatch (bashrc.autopatch,1.32 KB, patch)
2006-07-17 04:56 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Tiefenbruck 2006-07-15 19:11:06 UTC
I would like a way to associate patches with packages so that I don't have to untar, apply, digest, etc. every time. For example, there could be a /etc/portage/patches directory with the same layout as /usr/portage .
Comment 1 Zac Medico gentoo-dev 2006-07-15 19:24:07 UTC
This can already be done via /etc/portage/bashrc or the per-package bashrc that is implemented in $PORTDIR/profiles/base/profile.bashrc.  You'd want to trigger the patch just after the unpack phase.  For example, it can be accomplished via the pre_src_compile user phase hook or by a conditional such as [ "${EBUILD_PHASE}" = compile ] && epatch mypatch.patch.
Comment 2 Zac Medico gentoo-dev 2006-07-15 23:55:50 UTC
I don't think we want to go out of our way to encourage this type of thing due to the possibility of users filing bugs about packages and forgetting about the patches that they've applied locally.  This is really what PORTDIR_OVERLAY is for.  If you want to exploit bashrc for patches, then that's fine.  Just remember what you've done before you file a bug.
Comment 3 solar (RETIRED) gentoo-dev 2006-07-17 04:56:44 UTC
Created attachment 91979 [details, diff]
bashrc.autopatch

Example of how I accomplish this same thing.
I use PATCH_OVERLAY=$PORTDIR_OVERLAY/patches/

Zac is right however this should probably not become any sort of 
default behavior of portage as it could cause problems that nobody 
else could trackdown when end users start adding custom patches.