From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5241413835B for ; Wed, 21 Oct 2020 17:58:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86C56E098A; Wed, 21 Oct 2020 17:58:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 6DE2AE0984 for ; Wed, 21 Oct 2020 17:58:51 +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 6BD23340D54 for ; Wed, 21 Oct 2020 17:58:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E35353B8 for ; Wed, 21 Oct 2020 17:58:47 +0000 (UTC) From: "Matt Turner" 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" Message-ID: <1603177803.f75188c7dfc1f7682c393d1d4b1b1ad4eae97a36.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/pre-kmerge.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: f75188c7dfc1f7682c393d1d4b1b1ad4eae97a36 X-VCS-Branch: master Date: Wed, 21 Oct 2020 17:58:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d70c2987-1cf1-4b20-a890-5f15b1b1a057 X-Archives-Hash: ecec26beacb60a4630ce23cde18601ef Message-ID: <20201021175847._HSNp9YZZdaOmwX28v9u7v0xwLAbJYs4Y-LiXxU1VI0@z> commit: f75188c7dfc1f7682c393d1d4b1b1ad4eae97a36 Author: Matt Turner gentoo org> AuthorDate: Mon Oct 19 22:38:06 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Tue Oct 20 07:10:03 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f75188c7 targets: Rewrite hppa pre-kmerge check Signed-off-by: Matt Turner gentoo.org> targets/support/pre-kmerge.sh | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh index dd51ae9a..165dfd51 100755 --- a/targets/support/pre-kmerge.sh +++ b/targets/support/pre-kmerge.sh @@ -2,32 +2,23 @@ source /tmp/chroot-functions.sh -case ${clst_hostarch} in - hppa) - got_32=0 - got_64=0 - for i in ${clst_boot_kernel} - do - if [ "${i: -2}" == "32" ] - then - if [ $got_32 -eq 1 ] - then - die "Only one 32 bit kernel can be configured" - fi - got_32=1 - elif [ "${i: -2}" == "64" ] - then - if [ $got_64 -eq 1 ] - then - die "Only one 64 bit kernel can be configured" - fi - got_64=1 - else - die "Kernel names must end by either 32 or 64" - fi - done - ;; -esac +if [[ ${clst_hostarch} == hppa ]]; then + for i in ${clst_boot_kernel}; do + case ${i} in + *32) + let num32++ + ;; + *64) + let num64++ + ;; + *) + die "Kernel names must end with either \"32\" or \"64\"" + ;; + esac + done + [[ $num32 > 1 ]] && die "Only one 32-bit kernel can be configured" + [[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured" +fi run_merge --oneshot genkernel install -d /tmp/kerncache