Allow the optimization of preinstalling vpp-ext-deps to fail 70/34970/1
authorAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 19 Jan 2022 14:16:03 +0000 (14:16 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 19 Jan 2022 14:16:03 +0000 (14:16 +0000)
e62c4bc9708a906d2dcd504cdcca5964b232d3b3 added stricter error handling,
thus creating a failure case if a packagecloud repo has been newly
created and is empty.

Relax the error handling, and add the comment about the motivation.

Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I8bfe6d69ab1a59622c60080e796f301b6b6f4ead

jjb/scripts/setup_vpp_ext_deps.sh

index 1ca982d..5ace223 100755 (executable)
 
 echo "---> jjb/scripts/setup_vpp_ext_deps.sh"
 
-set -e -o pipefail
+# Normally we would have the settings in any bash script stricter:
+#    set -e -o pipefail
+#
+# But there is a corner case scenario that triggers an error,
+# namely when a new packagecloud repo is created, it is completely
+# empty. Then the installation fails. However, since this
+# script is an optimization, it is okay for it to fail without failing
+# the entire job.
+#
+# Therefore, we do not use the "-e" here.
+
+set -o pipefail
 
 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')