CI: show meaningful error for outdated pmaports (!167)

When we bump the version in pmaports.cfg and the min. required pmaports
version in the pmbootstrap code, then forks of pmaports.git must be
rebased on pmaports.git master. Otherwise "pmbootstrap init" fails, and
because we have it set to quiet (so the output does not distract from
the interesting output if everything goes fine), there was no meaningful
error message yet.

Wrap the "pmbootstrap init" call and display a helpful message that
tells the user to rebase.
This commit is contained in:
Oliver Smith 2019-01-22 07:02:43 +01:00
parent f0f6db1bae
commit 158ac15143

View file

@ -32,5 +32,18 @@ mv pmbootstrap-* pmbootstrap
# Install to $PATH and init
ln -s /tmp/pmbootstrap/pmbootstrap.py /usr/local/bin/pmbootstrap
echo "Initializing pmbootstrap"
su pmos -c "yes '' | pmbootstrap -q --aports '$pmaports' init"
if ! su pmos -c "yes '' | pmbootstrap -q --aports '$pmaports' init"; then
echo "ERROR: pmbootstrap init failed!"
echo
echo "Most likely, this means that pmbootstrap requires a newer"
echo "pmaports version. Please rebase on the official pmaports.git"
echo "master branch and try again."
echo
echo "Let us know in the chat or issues if you have trouble with that"
echo "and we will be happy to help. Sorry for the inconvenience."
echo
echo "(If that does not help, click on 'Browse' in the 'Job artifacts'"
echo "next to this log output, and have a look at log.txt.)"
exit 1
fi
echo ""