Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142791 - emerge with patching on the fly
Summary: emerge with patching on the fly
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-04 07:21 UTC by pavel sanda
Modified: 2006-08-04 07:49 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 pavel sanda 2006-08-04 07:21:53 UTC
hi,

it will be quite useful to me, if emerge could patch the package on-the-fly.
everlasting creating new alternative ebuilds for new each versions is
tedious.

it could work like this:

emerge --patch "file.patch" package
(or alternatively --patch-url "http://somewhere/file.patch"

which after unziping sources (and applying patches specified by the appropriate ebuild) puts "file.patch" into "work" directory runs something like:
cat file.patch |patch -p0 -E

and after that normally runs the rest of the emerge process.

have a nice day
pavel
Comment 1 Simon Stelling (RETIRED) gentoo-dev 2006-08-04 07:49:00 UTC
this has some heavy disadvantages:

1. totally intransparent
2. you can only emerge one package this way, as the patch will likely fail for all others
3. you have to specify the --patch argument every time you update the patched program

Better ways to handle this situation are:

a) Get the patch applied upstream. This is still the best solution in most cases, and after all this is how open source works.
b) use post_src_unpack/pre_src_compile hooks through bashrc

Both are already doable with current versions of portage, so I am going to close this as WORKSFORME.