Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH 20/37] targets: Remove wrong make.conf munging
Date: Wed, 21 Oct 2020 00:24:33
Message-Id: 20201021002344.378131-20-mattst88@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 01/37] catalyst: Use early return to unindent code by Matt Turner
1 With pkgcache fixed for kernel sources in a prior commit, I noticed that
2 if a livecd-stage2 built three kernels, the first would emerge normally
3 and build a binpkg, the second would emerge and fail to use the binpkg
4 produced earlier, and the third would use a previously produced binpkg.
5 I discovered the reason is that the second and third emerges are run
6 after USE="... build" has been added to make.conf. We intentionally
7 removed this in commit c0fcbf02 ("kmerge.sh: Don't set USE=build for
8 emerging kernels.") years ago, so I was surprised to find this code.
9
10 The commit mentioned below inexplicably (and wrongly) readded USE=build
11 to make.conf, failed to update the sed command to remove it, and readded
12 the addition in entirely the wrong spot so it didn't even affect the
13 kernel merge.
14
15 genkernel doesn't source the system's make.conf, so this code would be
16 entirely useless if it wasn't harmful.
17
18 Fixes: 0343a18e ("Fix merging kernel without kerncache enabled.")
19 Signed-off-by: Matt Turner <mattst88@g.o>
20 ---
21 targets/support/kmerge.sh | 6 ------
22 1 file changed, 6 deletions(-)
23
24 diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
25 index 4f82a01f..1209e330 100755
26 --- a/targets/support/kmerge.sh
27 +++ b/targets/support/kmerge.sh
28 @@ -238,14 +238,8 @@ $(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev
29 fi
30 fi
31
32 -# Update USE flag in make.conf
33 -[ -e ${clst_make_conf} ] && \
34 - echo "USE=\"\${USE} ${kernel_use} build\"" >> ${clst_make_conf}
35 -
36 genkernel_compile
37
38 -sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
39 -
40 if [ -n "${clst_KERNCACHE}" ]
41 then
42 echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
43 --
44 2.26.2