On Mittwoch 30 Dezember 2009, Willie Wong wrote:
> On Wed, Dec 30, 2009 at 01:17:52PM +0100, Penguin Lover Frank Schwidom 
squawked:
> > as i noticed the directory /usr/portage/distfiles holds all installed
> > sources. What i want to do is modifying the code and reinstalling the
> > package. What is the simplest way? Is it possible without modifying the
> > ebuild? (i dont want to use make and 'make install' directly)
> 
> Well, one way is to run the portage commands manually. And pause after
> unpacking to put in your changes. Read 'man ebuild' for how this
> can go.
> 
> But if you want everything automated: say you want to modify the
> source, repackage, and just emerge <pkgname>, then I think you will
> have to at least re-manifest the distfile to get the checksum to
> match, else emerge won't proceed.
> 
> Someone else should be able to give a better response as to what the
> standard practice is with patches. I think one of the simplest ways to
> do what you want to do is to
> 
> *) Make your own overlay
> *) create the appropriate <cat>/<pkg> directory
> *) Copy over the ebuild. create a files/ subdirectory
> *) Put your patch in the files/ subdirectory
> *) Add 'epatch "${FILESDIR}"/<patchname>.patch' in the src_unpack
> function of the ebuild.
> *) digest/manifest... run?
> 
> (I hope I didn't forget any step in the above.)
> 
> Cheers,
> 
> W
> 

you can make it even easier:
create:
/etc/portage/env/PKG_CATEGORY
put patch in that directory
create file:
/etc/portage/PKG_CATEGORY/PKGNAME
with this:

  post_src_prepare() { 
    epatch "/etc/portage/env/PKG_CATEGORY/NAMEOF:PATCH" 
 }

and you are done. remerge the pkg. 

Reply via email to