From d78a30fdb069418ed3a9accf5682cda7961d80ed Mon Sep 17 00:00:00 2001 From: Antonio Gurgel Date: Mon, 22 Aug 2022 19:46:23 -0700 Subject: [PATCH 1/2] common/travis/build.sh: Handle all retcodes There are some cases in which `xbps-src` will exit 2: $ ag -c 'exit 2' xbps-src common xbps-src:1 common/xbps-src/shutils/common.sh:2 $ # 1. Sending INT/TERM to xbps-src, $ # 2. attempting to cross-build a `nocross` pkg, and $ # 3. attempting to build a `broken` pkg. build.sh eats that retcode if it's looking only for `exit 1`, incorrectly signaling a successful build. --- common/travis/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/travis/build.sh b/common/travis/build.sh index 007a61f994d7..cb48764cc6ee 100755 --- a/common/travis/build.sh +++ b/common/travis/build.sh @@ -14,7 +14,8 @@ PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates)) for pkg in ${PKGS}; do /hostrepo/xbps-src -j$(nproc) -s -H "$HOME"/hostdir $arch $test pkg "$pkg" - [ $? -eq 1 ] && exit 1 + ret=$? + [ $ret -ne 0 ] && exit $ret done exit 0 From 61b2b8ed83aa3ea1e94fc0911f1aad9562f1c9bd Mon Sep 17 00:00:00 2001 From: Antonio Gurgel Date: Mon, 22 Aug 2022 19:55:59 -0700 Subject: [PATCH 2/2] common/travis/changed_templates.sh: reword pls-rebase msg --- common/travis/changed_templates.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh index 686436ce4327..b4d882ce039c 100755 --- a/common/travis/changed_templates.sh +++ b/common/travis/changed_templates.sh @@ -15,8 +15,8 @@ case "$tip" in esac base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || { - echo "Your branches is based on too old copy." - echo "Please rebase to newest copy." + echo "Your branch is too far behind the upstream master branch." + echo "To retry, rebase your branch and force-push." exit 1 }