DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH] qemu-run: don't evaluate selected_platformconfig
@ 2023-10-10  9:10 Roland Hieber
  2023-10-18  9:15 ` Robert Schwebel
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Hieber @ 2023-10-10  9:10 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

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 <rhi@pengutronix.de>
---
 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-18  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10  9:10 [DistroKit] [PATCH] qemu-run: don't evaluate selected_platformconfig Roland Hieber
2023-10-18  9:15 ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox