]> Git Repo - qemu.git/commitdiff
docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset
authorSascha Silbe <[email protected]>
Tue, 6 Sep 2016 20:05:47 +0000 (22:05 +0200)
committerFam Zheng <[email protected]>
Thu, 8 Sep 2016 11:56:34 +0000 (19:56 +0800)
The debian-bootstrap image doesn't choose a default architecture and
distribution version, instead the user has to set both DEB_ARCH and
DEB_TYPE in the environment. Print a reasonably helpful message if
either of them isn't set instead of complaining about "qemu-" being
missing or erroring out because we cannot cd to the mirror URL.

Signed-off-by: Sascha Silbe <[email protected]>
Message-Id: <1473192351[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
tests/docker/dockerfiles/debian-bootstrap.pre

index 9b95a6b3ce2586751d40c2b4e610fd4cd5168dd4..3d9f7f460b03bb92b9a4fe7c332effc8147e4925 100755 (executable)
@@ -15,6 +15,19 @@ exit_and_skip()
 if [ -z $FAKEROOT ]; then
     echo "Please install fakeroot to enable bootstraping" >&2
     exit_and_skip
+
+fi
+
+if [ -z "${DEB_ARCH}" ]; then
+    echo "Please set DEB_ARCH to choose an architecture (e.g. armhf)" >&2
+    exit_and_skip
+
+fi
+
+if [ -z "${DEB_TYPE}" ]; then
+    echo "Please set DEB_TYPE to a Debian archive name (e.g. testing)" >&2
+    exit_and_skip
+
 fi
 
 # We check in order for
This page took 0.02422 seconds and 4 git commands to generate.