Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Re: [gentoo-commits] gentoo-x86 commit in app-admin/chrpath: ChangeLog chrpath-0.13-r2.ebuild
Date: Wed, 12 Oct 2011 19:33:41
Message-Id: 201110121533.07266.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Re: Re: [gentoo-commits] gentoo-x86 commit in app-admin/chrpath: ChangeLog chrpath-0.13-r2.ebuild by Samuli Suominen
1 On Wednesday 12 October 2011 15:19:25 Samuli Suominen wrote:
2 > On 10/12/2011 06:30 AM, Steven J Long wrote:
3 > > Michał Górny wrote:
4 > >> I don't think that passing multiple files to epatch actually improves
5 > >> readability. Simple example:
6 > >>
7 > >> # bug #123456, foo, bar
8 > >> epatch "${FILESDIR}"/${P}-foo.patch
9 > >> # bug #234567, baz bazinga blah blah
10 > >> epatch "${FILESDIR}"/${P}-baz.patch
11 > >>
12 > >> With multiple arguments, you can't put comments in the middle.
13 > >
14 > > ++ It's also a lot easier to remove the single patches when they're no
15 > > longer needed.
16 >
17 > Removing an 'epatch foo' line is easier than 'foo \' ? You are kidding,
18 > right?
19 >
20 > > In the context of configuring, building and installing a
21 > > package, the extra overhead is miniscule, whereas the above is *much*
22 > > easier to maintain.
23 >
24 > Based on what argument?
25 >
26 > Having the comments inside the patch allows everyone, including
27 > _upstreams_ straight up see what's it for and link to the bug it's
28 > coming from. Where as keeping them in ebuilds makes it Gentoo specific,
29 > which is not what we are about.
30
31 i personally prefer:
32 epatch "${FILESDIR}"/${P}-foo.patch #12345
33 epatch "${FILESDIR}"/${P}-bar.patch #19512 #91991
34 epatch "${FILESDIR}"/${P}-fatcow.patch #19291
35 because i personally like to have just the bug number there
36
37 i know other people prefer to pass these all on one line:
38 epatch \
39 "${FILESDIR}"/${P}-foo.patch \
40 "${FILESDIR}"/${P}-bar.patch \
41 "${FILESDIR}"/${P}-fatcow.patch
42
43 there is no standard here (i think they're more or less equally common) and
44 maintainers are free to pick what they like best. arguing about the merits
45 between the two above styles is a waste of everyone's time. go fix some bugs
46 instead you lazy wankers :P.
47
48 the one thing Samuli is correct about though and largely has nothing to do
49 with style is that the patch itself needs to have all the relevant
50 information. doing the following is wrong:
51 # here i explain what the patch is for #12351
52 epatch "${FILESDIR}"/${P}-bar.patch
53 (and the bar patch contains only the diff)
54
55 rather than rehash why you're wrong if you do the above, please read:
56 http://dev.gentoo.org/~vapier/clean-patches
57 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies