Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] kernel-2.eclass: introduce K_FROM_GIT for sources that derive from git repos
Date: Sun, 21 Aug 2016 01:20:31
Message-Id: 974dc465-5e3c-d00a-3b0c-873f2dd0a54c@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] kernel-2.eclass: introduce K_FROM_GIT for sources that derive from git repos by Daniel Campbell
1 On 08/20/2016 20:22, Daniel Campbell wrote:
2 > On 08/20/2016 05:13 AM, Joshua Kinard wrote:
3 >> All,
4 >>
5 >> It looks like that sometime around Linux 3.15, some kind of a quirk was
6 >> introduced where a patch that contains the removal of a symlink followed by the
7 >> addition of a file with the same name as the symlink causes patch's --dry-run
8 >> phase to fail, which kills 'epatch'. See Bug #507656.
9 >>
10 >> A workaround was added to kernel-2.eclass, around line 1093, that hardcodes a
11 >> check for sys-kernel/git-sources, to avoid this issue. Well,
12 >> sys-kernel/mips-sources is also affected by the same issue. I'm close to
13 >> releasing a newer mips-sources, having spent the last few months
14 >> re-writing/refactoring chunks of old SGI IP27/BRIDGE code, and rather than add
15 >> another hardcode to kernel-2, I instead created a new variable, K_FROM_GIT,
16 >> that will replace the hardcode.
17 >>
18 >> When set to a value, it triggers the workaround, which still affects current
19 >> kernels. This results in a cleaner implementation instead of a hardcoded
20 >> ebuild, should future kernel packages sourced from a git repo get added.
21 >>
22 >> Patch is attached for review.
23 >>
24 >> Thanks!
25 >>
26 >
27 > lgtm, but I'm curious over the targeting of -rc releases. Are the only
28 > releases after 15 in the 3.x series -rc? If not, you're going to run
29 > into problems where a kernel is >=3.15 but not an rc.
30 >
31 > Otherwise it seems better than hardcoding it imo.
32
33 This bug smells more like a corner-case problem with patch itself, but I am not
34 certain yet if it's been reported upstream to the GNU folks. Seems to affect
35 sources built on top of, or pulled from, git repos. mips-sources is derived
36 from periodic checkouts I do from the linux-mips.org git repo (ralf/linux.git),
37 with custom patches stacked on top. Without this workaround, applying the base
38 patches (either patch-x.y from kernel.org or the mipsgit-x.y.z-yyyymmdd* patch
39 I diff myself) will fail, on both -rc or stable releases.
40
41 --
42 Joshua Kinard
43 Gentoo/MIPS
44 kumba@g.o
45 6144R/F5C6C943 2015-04-27
46 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
47
48 "The past tempts us, the present confuses us, the future frightens us. And our
49 lives slip away, moment by moment, lost in that vast, terrible in-between."
50
51 --Emperor Turhan, Centauri Republic