Jenkins: Catch more MacPorts activation errors
This commit is contained in:
21
.ci/build.sh
21
.ci/build.sh
@@ -540,12 +540,25 @@ then
|
|||||||
# Attempt to install dependencies.
|
# Attempt to install dependencies.
|
||||||
sudo "$macports/bin/port" install $(cat .ci/dependencies_macports.txt) 2>&1 | tee macports.log
|
sudo "$macports/bin/port" install $(cat .ci/dependencies_macports.txt) 2>&1 | tee macports.log
|
||||||
|
|
||||||
# Stop if no port version activation errors were found.
|
# Check for port activation errors.
|
||||||
stuck_dep=$(grep " cannot be built while another version of " macports.log | cut -d" " -f10)
|
stuck_dep=$(grep " cannot be built while another version of " macports.log | cut -d" " -f10)
|
||||||
[ -z $stuck_dep ] && break
|
if [ -n "$stuck_dep" ]
|
||||||
|
then
|
||||||
|
# Deactivate the stuck dependency and try again.
|
||||||
|
sudo "$macports/bin/port" -f deactivate "$stuck_dep"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
# Deactivate the stuck dependency and try again.
|
stuck_dep=$(grep " Please deactivate this port first, or " macports.log | cut -d" " -f5 | tr -d :)
|
||||||
sudo "$macports/bin/port" -f deactivate $stuck_dep
|
if [ -n "$stuck_dep" ]
|
||||||
|
then
|
||||||
|
# Activate the stuck dependency and try again.
|
||||||
|
sudo "$macports/bin/port" -f activate "$stuck_dep"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Stop if no errors were found.
|
||||||
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove MacPorts error detection log.
|
# Remove MacPorts error detection log.
|
||||||
|
Reference in New Issue
Block a user