From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1216418-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9550B13835A
	for <garchives@archives.gentoo.org>; Tue, 20 Oct 2020 08:30:31 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7CB19E0828;
	Tue, 20 Oct 2020 08:30:30 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 64E00E0828
	for <gentoo-commits@lists.gentoo.org>; Tue, 20 Oct 2020 08:30:30 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 3C806340AF0
	for <gentoo-commits@lists.gentoo.org>; Tue, 20 Oct 2020 08:30:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id AC7543B1
	for <gentoo-commits@lists.gentoo.org>; Tue, 20 Oct 2020 08:30:27 +0000 (UTC)
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1603177801.5af4e00582761330325abdef14f507e8aaa1dc99.mattst88@gentoo>
Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/support/kmerge.sh
X-VCS-Directories: targets/support/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: 5af4e00582761330325abdef14f507e8aaa1dc99
X-VCS-Branch: pending/mattst88
Date: Tue, 20 Oct 2020 08:30:27 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 11dd1d69-43b9-40e7-822b-63cab0c5136c
X-Archives-Hash: 9bd6ffa0c3f354cf4192ff578fd6016c
Message-ID: <20201020083027.bd0fpZS4bW_uu46o8ZlYa0dfITsnVoLIYE-y-z54l_o@z>

commit:     5af4e00582761330325abdef14f507e8aaa1dc99
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 06:59:20 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:01 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5af4e005

targets: Remove wrong make.conf munging

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 <mattst88 <AT> 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