[Pkg-xen-devel] [PATCH 03/19] d/shuffle-binaries: Make error detection/message overt

Elliott Mitchell ehem+debian at m5p.com
Wed Dec 2 19:49:28 GMT 2020


The reason for the `ls` at the end is pretty straightforward if you think
about it, mainly confirming the shuffle step did something.  Yet that
is a bit non-obvious, and the error message produced on failure is poor
("No such file or directory" simply means the script failed somewhere?).
Add an overt error message.

Signed-off-by: Elliott Mitchell <ehem+debian at m5p.com>
---
 debian/shuffle-binaries | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/shuffle-binaries b/debian/shuffle-binaries
index cff6de5428..31aa01e2bd 100755
--- a/debian/shuffle-binaries
+++ b/debian/shuffle-binaries
@@ -47,4 +47,7 @@ for binary in `find $t/usr/{bin,sbin} -type f`; do
 	)
 done
 
-ls debian/shuffle-binaries.stamp
+if [ ! -e "$0.stamp" ]; then
+	echo "Failed to shuffle binaries!" 1>&2
+	exit 1
+fi
-- 


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445






More information about the Pkg-xen-devel mailing list