From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 10 Oct 2023 11:10:48 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qq8lM-002wlH-GQ for lore@lore.pengutronix.de; Tue, 10 Oct 2023 11:10:48 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qq8lL-0002u0-4t; Tue, 10 Oct 2023 11:10:47 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qq8lF-0002tm-TY; Tue, 10 Oct 2023 11:10:41 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qq8lF-000cw4-H3; Tue, 10 Oct 2023 11:10:41 +0200 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qq8lF-00ES6F-1X; Tue, 10 Oct 2023 11:10:41 +0200 From: Roland Hieber To: distrokit@pengutronix.de Date: Tue, 10 Oct 2023 11:10:28 +0200 Message-Id: <20231010091028.3444582-1-rhi@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH] qemu-run: don't evaluate selected_platformconfig X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roland Hieber Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Even when a selected_platformconfig symlink exists, ptxdist can still be used with the --platformconfig=... option to override the platformconfig during the build. In this case, running the qemu script will search in the wrong build folder for the images. Don't use the selected_platformconfig link to find out the platform, instead determine it from the path of the qemu script itself. Signed-off-by: Roland Hieber --- configs/platform-mips/run | 9 ++------- configs/platform-mipsel/run | 9 ++------- configs/platform-v7a/run | 9 ++------- configs/platform-v7a_noneon/run | 9 ++------- configs/platform-x86_64/run | 11 +++-------- 5 files changed, 11 insertions(+), 36 deletions(-) diff --git a/configs/platform-mips/run b/configs/platform-mips/run index e41f01283ca3..6d6fca68c2cd 100755 --- a/configs/platform-mips/run +++ b/configs/platform-mips/run @@ -1,17 +1,12 @@ #!/bin/bash -platformconfig=selected_platformconfig -# fallback to platformconfig in the same dir as this script -if [ ! -e "$platformconfig" ]; then - platformconfig=$(dirname $0)/platformconfig -fi +platformconfig=$(dirname $0)/platformconfig # # we need information about the platform # if [ ! -e "$platformconfig" ]; then - echo "error: selected_platformconfig does not exist" - echo " please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'" + echo "error: ${platformconfig} does not exist" exit 1 fi diff --git a/configs/platform-mipsel/run b/configs/platform-mipsel/run index 6407f0c0729e..9ecf65b2e429 100755 --- a/configs/platform-mipsel/run +++ b/configs/platform-mipsel/run @@ -1,17 +1,12 @@ #!/bin/bash -platformconfig=selected_platformconfig -# fallback to platformconfig in the same dir as this script -if [ ! -e "$platformconfig" ]; then - platformconfig=$(dirname $0)/platformconfig -fi +platformconfig=$(dirname $0)/platformconfig # # we need information about the platform # if [ ! -e "$platformconfig" ]; then - echo "error: selected_platformconfig does not exist" - echo " please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'" + echo "error: ${platformconfig} does not exist" exit 1 fi diff --git a/configs/platform-v7a/run b/configs/platform-v7a/run index 3874a7b2f0af..257dc1a6fd2e 100755 --- a/configs/platform-v7a/run +++ b/configs/platform-v7a/run @@ -1,17 +1,12 @@ #!/bin/bash -platformconfig=selected_platformconfig -# fallback to platformconfig in the same dir as this script -if [ ! -e "$platformconfig" ]; then - platformconfig=$(dirname $0)/platformconfig -fi +platformconfig=$(dirname $0)/platformconfig # # we need information about the platform # if [ ! -e "$platformconfig" ]; then - echo "error: selected_platformconfig does not exist" - echo " please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'" + echo "error: ${platformconfig} does not exist" exit 1 fi diff --git a/configs/platform-v7a_noneon/run b/configs/platform-v7a_noneon/run index 0bb06bc60868..ccdcdb91c767 100755 --- a/configs/platform-v7a_noneon/run +++ b/configs/platform-v7a_noneon/run @@ -1,17 +1,12 @@ #!/bin/bash -platformconfig=selected_platformconfig -# fallback to platformconfig in the same dir as this script -if [ ! -e "$platformconfig" ]; then - platformconfig=$(dirname $0)/platformconfig -fi +platformconfig=$(dirname $0)/platformconfig # # we need information about the platform # if [ ! -e "$platformconfig" ]; then - echo "error: selected_platformconfig does not exist" - echo " please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'" + echo "error: ${platformconfig} does not exist" exit 1 fi diff --git a/configs/platform-x86_64/run b/configs/platform-x86_64/run index ddc510070418..b826b4436d0d 100755 --- a/configs/platform-x86_64/run +++ b/configs/platform-x86_64/run @@ -1,17 +1,12 @@ #!/bin/bash -platformconfig=selected_platformconfig -# fallback to platformconfig in the same dir as this script -if [ ! -e "$platformconfig" ]; then - platformconfig=$(dirname $0)/platformconfig -fi - +platformconfig=$(dirname $0)/platformconfig +# # # we need information about the platform # if [ ! -e "$platformconfig" ]; then - echo "error: selected_platformconfig does not exist" - echo " please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'" + echo "error: ${platformconfig} does not exist" exit 1 fi -- 2.39.2