jjb: Support s3cmd 2.3 in lttng-modules build
authorKienan Stewart <kstewart@efficios.com>
Fri, 4 Aug 2023 14:55:53 +0000 (10:55 -0400)
committerKienan Stewart <kstewart@efficios.com>
Mon, 7 Aug 2023 20:55:57 +0000 (16:55 -0400)
Change-Id: I628954139b075160f84ea1fd9acd8125d9e6b410

scripts/lttng-modules/param-build.sh

index 3657fc86a815caf2fdac06f991336e74aa49815d..b5c8b8f8b598a855a1fd56d342c333d06808ed92 100644 (file)
@@ -648,12 +648,16 @@ fi
 obj_url="$obj_url_prefix/$obj_name"
 
 set +e
-s3cmd -c "$WORKSPACE/.s3cfg" get "$obj_url"
+# In s3cmd 2.3, the return code of get when an object does not exist (64)
+# is different than in 2.2 (12). The return codes of 's3cmd info' are
+# consistent between 2.2 and 2.3.
+s3cmd -c "$WORKSPACE/.s3cfg" info "$obj_url"
 ret=$?
 set -e
 
 case "$ret" in
     "0")
+      s3cmd -c "$WORKSPACE/.s3cfg" get "$obj_url"
       extract_archive_obj
       ;;
 
This page took 0.023613 seconds and 4 git commands to generate.