Gentoo Archives: gentoo-user

From: Volker Armin Hemmann <volkerarmin@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Recompiling already installed packages with modification
Date: Wed, 30 Dec 2009 13:03:26
Message-Id: 200912301402.57052.volkerarmin@googlemail.com
In Reply to: Re: [gentoo-user] Recompiling already installed packages with modification by Willie Wong
1 On Mittwoch 30 Dezember 2009, Willie Wong wrote:
2 > On Wed, Dec 30, 2009 at 01:17:52PM +0100, Penguin Lover Frank Schwidom
3 squawked:
4 > > as i noticed the directory /usr/portage/distfiles holds all installed
5 > > sources. What i want to do is modifying the code and reinstalling the
6 > > package. What is the simplest way? Is it possible without modifying the
7 > > ebuild? (i dont want to use make and 'make install' directly)
8 >
9 > Well, one way is to run the portage commands manually. And pause after
10 > unpacking to put in your changes. Read 'man ebuild' for how this
11 > can go.
12 >
13 > But if you want everything automated: say you want to modify the
14 > source, repackage, and just emerge <pkgname>, then I think you will
15 > have to at least re-manifest the distfile to get the checksum to
16 > match, else emerge won't proceed.
17 >
18 > Someone else should be able to give a better response as to what the
19 > standard practice is with patches. I think one of the simplest ways to
20 > do what you want to do is to
21 >
22 > *) Make your own overlay
23 > *) create the appropriate <cat>/<pkg> directory
24 > *) Copy over the ebuild. create a files/ subdirectory
25 > *) Put your patch in the files/ subdirectory
26 > *) Add 'epatch "${FILESDIR}"/<patchname>.patch' in the src_unpack
27 > function of the ebuild.
28 > *) digest/manifest... run?
29 >
30 > (I hope I didn't forget any step in the above.)
31 >
32 > Cheers,
33 >
34 > W
35 >
36
37 you can make it even easier:
38 create:
39 /etc/portage/env/PKG_CATEGORY
40 put patch in that directory
41 create file:
42 /etc/portage/PKG_CATEGORY/PKGNAME
43 with this:
44
45 post_src_prepare() {
46 epatch "/etc/portage/env/PKG_CATEGORY/NAMEOF:PATCH"
47 }
48
49 and you are done. remerge the pkg.

Replies

Subject Author
Re: [gentoo-user] Recompiling already installed packages with modification Willie Wong <wwong@××××××××××××××.edu>