From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFB4A20DDB for ; Wed, 8 May 2024 06:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151042; cv=none; b=dFPNFFFq/MOKKGTZfEzJphriEMLm7KWHwliyeeOMN2N+PVLcd3yqomt7kbIiTaPFGhq2UKLew9g8AhjbrATfodAt8s3+MxP5ykmS6oBRjppw4SzyJqPiUVplN79CQkrma2OHqA8KT7YYi8vX0J/zmWQ+KJlqie6ma5wqZ6EGwUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151042; c=relaxed/simple; bh=84Qu61+89UhtMa/4ROeCMBwL8kW7efhakWeQIGSEepM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UZwOFo0stkIkSXMO0bb+eeY9WRDRylfsDyM0+e328cPKXxwFgLE+y9PyNgIOrqIozR6j0TWtgmHjHhOM9rjZ4NRo1oH+Vivb6Vzwm1525fabRcXEWy695dyjDPbj5Q4fss91o8iR4QcX7Usm1OJBicff8Dnc0zSQ927u9ATH7Dk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Vp4eZk7b; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Vp4eZk7b" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=lmjwn3cVgSxAIxh/bVLHG1eqDqfwDCE604ZsaOmS5hI=; b=Vp4eZk7bz8lxcqLcGecwP6Z/dQ be2o0gC3JKTFYZP7qU6ZaBOHfyU+MYZDhu1ROK/ATrbXACB9Y3LWqNh58jqNLrlOLvr9Oi+r0JaRH Lad3Xf255CoxnDKGxmfuHiAWxCLQLvaKpsaYlRf7XqTpM2jBUaelVGMDQVmhNCnFWLlx3wB9z6qNR tIKMo+nUtRtoHGZiuKj/4KkNStg0or++4uWF45hGIJ/K+XiGpSAW0fu3RSMNVGfybmknqgfqgjQvn T2vl1p1FylBcD0Oq7o10S5Y9M4s7NYxRv6QdMjj4acsKZSUVG1dLmhXxoW2ePZmbnWy0yw/r/f0Eg RJpH5Wuw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b8S-0000000EIke-1Ma1; Wed, 08 May 2024 06:50:40 +0000 From: Luis Chamberlain To: kdevops@lists.linux.dev Cc: mcgrof@kernel.org Subject: [PATCH 08/10] guestfs: move copying yum repo to its own routine Date: Tue, 7 May 2024 23:50:36 -0700 Message-ID: <20240508065039.3408637-9-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240508065039.3408637-1-mcgrof@kernel.org> References: <20240508065039.3408637-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Following the same logic as before, move the yum repo copying to its own routine. Signed-off-by: Luis Chamberlain --- scripts/bringup_guestfs.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh index 2102fd81cf31..8210b3cf1b19 100755 --- a/scripts/bringup_guestfs.sh +++ b/scripts/bringup_guestfs.sh @@ -173,6 +173,13 @@ sm-unregister _EOT } +copy_yum_repo() +{ + cat <<_EOT >>$cmdfile +copy-in $CONFIG_KDEVOPS_CUSTOM_YUM_REPOFILE:/etc/yum.repos.d +_EOT +} + copy_host_sources() { TARGET_DIR="$(dirname $CONFIG_GUESTFS_DISTRO_SOURCE_AND_DEST_FILE)" @@ -204,9 +211,7 @@ if [ ! -f $BASE_IMAGE ]; then fi if [ -n "$CONFIG_KDEVOPS_CUSTOM_YUM_REPOFILE" ]; then - cat <<_EOT >>$cmdfile -copy-in $CONFIG_KDEVOPS_CUSTOM_YUM_REPOFILE:/etc/yum.repos.d -_EOT + copy_yum_repo fi if [[ "$CONFIG_GUESTFS_COPY_SOURCES_FROM_HOST_TO_GUEST" == "y" ]]; then -- 2.43.0