From 8b4d5622f3cd1694a43665dd4007caf6bf1244a3 Mon Sep 17 00:00:00 2001 From: Faustin Lammler Date: Wed, 27 Apr 2022 14:30:23 +0200 Subject: [PATCH] bb.org: bug fix in rpm-upgrade Environment print should not exit --- buildbot.mariadb.org/scripts/rpm-install.sh | 8 ++++++++ buildbot.mariadb.org/scripts/rpm-upgrade.sh | 2 ++ 2 files changed, 10 insertions(+) diff --git a/buildbot.mariadb.org/scripts/rpm-install.sh b/buildbot.mariadb.org/scripts/rpm-install.sh index 6cc8a034..cd364015 100755 --- a/buildbot.mariadb.org/scripts/rpm-install.sh +++ b/buildbot.mariadb.org/scripts/rpm-install.sh @@ -19,6 +19,14 @@ set -x # print disk usage df -kT +# Mandatory variables +for var in arch master_branch; do + if [[ -z $var ]]; then + bb_log_err "$var is not defined" + exit 1 + fi +done + # # //TEMP this should be done in the VM preparation # case "$master_branch" in # *mdev10416*) diff --git a/buildbot.mariadb.org/scripts/rpm-upgrade.sh b/buildbot.mariadb.org/scripts/rpm-upgrade.sh index 35c5523c..bea2a5c1 100755 --- a/buildbot.mariadb.org/scripts/rpm-upgrade.sh +++ b/buildbot.mariadb.org/scripts/rpm-upgrade.sh @@ -44,10 +44,12 @@ bb_log_info " Previous major version $prev_major_version" bb_log_info "Current test mode: $test_mode" # Environment +set +e rpm -qa | grep -iE 'maria|mysql|galera' cat /etc/*release uname -a df -kT +set -e # Check whether a previous version exists if ! wget "https://yum.mariadb.org/$prev_major_version/$repo_dist_arch/repodata" -O repodata.list; then