With pkgcache fixed for kernel sources in a prior commit, I noticed that if a livecd-stage2 built three kernels, the first would emerge normally and build a binpkg, the second would emerge and fail to use the binpkg produced earlier, and the third would use a previously produced binpkg. I discovered the reason is that the second and third emerges are run after USE="... build" has been added to make.conf. We intentionally removed this in commit c0fcbf02 ("kmerge.sh: Don't set USE=build for emerging kernels.") years ago, so I was surprised to find this code.
The commit mentioned below inexplicably (and wrongly) readded USE=build to make.conf, failed to update the sed command to remove it, and readded the addition in entirely the wrong spot so it didn't even affect the kernel merge. genkernel doesn't source the system's make.conf, so this code would be entirely useless if it wasn't harmful. Fixes: 0343a18e ("Fix merging kernel without kerncache enabled.") Signed-off-by: Matt Turner <matts...@gentoo.org> --- targets/support/kmerge.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index 4f82a01f..1209e330 100755 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -238,14 +238,8 @@ $(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev fi fi -# Update USE flag in make.conf -[ -e ${clst_make_conf} ] && \ - echo "USE=\"\${USE} ${kernel_use} build\"" >> ${clst_make_conf} - genkernel_compile -sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf} - if [ -n "${clst_KERNCACHE}" ] then echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE -- 2.26.2