Gentoo Archives: gentoo-user

From: Nick Rout <nick@×××××××.nz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] modifying locally an ebuild
Date: Wed, 31 Aug 2005 03:30:02
Message-Id: 20050831151232.0536.NICK@rout.co.nz
In Reply to: Re: [gentoo-user] modifying locally an ebuild by Holly Bostick
1 On Wed, 31 Aug 2005 03:36:57 +0200
2 Holly Bostick wrote:
3
4 > Fernando Canizo schreef:
5 > > Hi all,
6 > >
7 > > I find a cute patch to mutt and to use it i modified the ebuild and
8 > > the pertinent files so now re-emerging mutt builds mutt with this
9 > > patch. Later i fixed the actual version of mutt so an upgrade cannot
10 > > erase it.
11 > >
12 > > What i would like to know is how can i do this i a 'gentoo way'. I
13 > > have listen that there are something called SLOTs, but never used so
14 > > far (never need them?)
15 > >
16 > > Or the only way is to propose the add of the patch to portage?
17 > >
18 >
19 [snip]
20 >
21 > If the ebuild in Portage hasn't changed, your modified ebuild will
22 > always be newer; if the ebuild in Portage has changed, it's quite likely
23 > that whatever patch or functionality you were waiting for has been
24 > merged into the main tree upstream, or backported into the ebuild, so
25 > you have an easy migration path back into main Portage (and of course,
26 > if you care enough about the application and its patchset to modify an
27 > ebuild and put it in your overlay, checking the ChangeLog of any updated
28 > ebuilds is not an onerous task).
29 >
30 > If the program has been updated, but your patch still isn't there, then
31 > you can just copy and modify the updated ebuild and files.
32 >
33 [snip]
34
35 Good post Holly, you should make it into a howto.
36
37 2 things spring to mind:
38
39 1. i thought that overlay always beats normal portage, but you are
40 saying newer ebuild file wins (ie if the official ebuild has been
41 updated but not renamed it will beat what is in overlay. ) - do you have
42 any reference for that (I sure don't, its just how I thought it worked)
43
44 2. Fernando might like to note that the way to introduce a patch to a
45 package (rather than an amendment to the ebuild) is to use the epatch
46 command. Commonly the line looks like this:
47
48 epatch ${FILESDIR}/cool-all-mutt.patch
49
50 In that case the patch is in the files directory below the ebuild file.
51
52 If the patch is large or publicly available, you are better NOT to put
53 it in the portage tree but have it downloaded from a mirror with e
54 SRC_URI command. If you want an example of this take a look at the
55 vlc-0.8.2-r1 ebuild (chosen by me cos I was unsuccessfully hacking it
56 the other day)
57
58 > --
59 > gentoo-user@g.o mailing list
60
61 --
62 Nick Rout <nick@×××××××.nz>
63
64 --
65 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] modifying locally an ebuild Fernando Canizo <conan@××××××××××.ar>