Apply a patch to an emerge from the command line
On 1/25/09, Grant <email@example.com> wrote:
> I could have sworn there was a way to specify a patch to be applied to
> an emerge from the command line, something like:
> EPATCH=file.patch emerge packagename
> I've been searching Google and the mailing list but I can't find
> mention of it anywhere. Was it a figment of my imagination?
This would be nice, but I don't think you can do this, at least not
this way. You can grep for EPATCH_* under /usr/portage to see some
samples of how EPATCH_* stuff seems to work, especially some php
eclasses give nice examples on one line.
Still, I think in practice it is for ebuilds' and eclasses' internal
use only -- and even then only for ebuilds/eclasses which inherit the
eutils.class which in turn implements epatch() which actually does
anything with the values.
Inside an ebuild you can set up those variables in the right spot
(e.g., right in the middle of src_unpack() after unpacking the source)
and immediately call epatch(). Coming from command line there probably
won't be that dangling epatch() call waiting for your parameters in
the right spot -- and other epatch calls or setting those variables
within the ebuild may interfere or override the settings you provided
depending on the case.
Still, I'd be happy to be mistaken, this would make my life easier as well.