Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: phajdan.jr@g.o
Subject: Re: [gentoo-dev] [RFC] Establishing Gentoo patch policy to keep our patches consistent and clean
Date: Sat, 06 Apr 2013 19:40:35
Message-Id: 20130406214127.52b4b500@pomiocik.lan
In Reply to: Re: [gentoo-dev] [RFC] Establishing Gentoo patch policy to keep our patches consistent and clean by "Paweł Hajdan
1 On Sat, 06 Apr 2013 12:02:28 -0700
2 ""Paweł Hajdan, Jr."" <phajdan.jr@g.o> wrote:
3
4 > On 4/6/13 11:08 AM, Michał Górny wrote:
5 > > 5. The patch name shall shortly summarize the changes done by it.
6 >
7 > Common sense again. :) And I agree that patches should do that, the
8 > question is just whether we put common sense into the policy.
9
10 Well, I think it's more like pointing out the few people who rather use
11 very short and ambiguous names. Although the git naming is bit verbose
12 here, I prefer that than 'lm.patch'.
13
14 find /usr/portage -name '*.patch' \
15 | awk -F/ '{ print length($NF) " " $NF }' | sort -k1 -n > /tmp/lol
16
17 > > 6. Patch files shall start with a brief description of what the patch
18 > > does. Developers are encouraged to use git-style tags like 'Fixes:' to
19 > > point to the relevant bug URIs.
20 >
21 > That could be helpful - could this be made more precise though? Is there
22 > any existing convention (going beyond git style, but specifically
23 > designed for distro or similar patches) we could follow?
24
25 I would honestly just go for the git style. It's the first thing that
26 really succeeded in standardizing patches. Inventing something new is
27 not really necessary, I believe.
28
29 > > 7. Patch combining is discouraged. Developers shall prefer multiple
30 > > patches following either the upstream commits or a logical commit
31 > > sequence (if changes are not committed upstream).
32 >
33 > Common sense as well.
34
35 Tell that to the people who believe in space savings :).
36
37 > > (2) is likely to be a bikeshed point here. Long story short, epatch has
38 > > this fragile patchlevel guessing, users don't have it. If we keep our
39 > > patches consistent to a single patchlevel, we gain:
40 > >
41 > > * ability for users to apply the patches without having them try all
42 > > patchlevels by hand.
43 > >
44 > > * clean error output if patch stops to apply for some reason.
45 > >
46 > > * no risk that patch will get applied to the wrong file if patch stops
47 > > to apply at expected patchlevel and starts to apply on another.
48 >
49 > The above two points are convincing for me. However, I do acknowledge
50 > that it some cases the guessing behavior can be useful for some people
51 > (e.g. different layout of git repo vs. release tarballs).
52 >
53 > How about having a one guessing and one non-guessing variant of epatch,
54 > and encouraging the non-guessing one?
55
56 In the end we will probably have a simple patch applying method
57 from PMS, and we will keep the epatch eclass monster -- at least
58 for some time.
59
60 To be honest, I'd rather prefer to find a good way to help people add
61 correct '-p'. We can -- for example -- make portage try various
62 patchlevels and suggest one if applying patch failed.
63
64 --
65 Best regards,
66 Michał Górny

Attachments

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

Replies