Merge pull request #1182 from cmclaughlin/aws-minor-release

Adding support for minor release pinning on AWS Linux
This commit is contained in:
Nicole Thomas 2017-12-27 09:31:49 -05:00 committed by GitHub
commit 19f1eb7862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4427,10 +4427,20 @@ install_amazon_linux_ami_deps() {
_USEAWS=$BS_FALSE
pkg_append="python"
repo_rev="$(echo "${STABLE_REV}" | sed 's|.*\/||g')"
if [ "$ITYPE" = "stable" ]; then
repo_rev="$STABLE_REV"
else
repo_rev="latest"
fi
if echo $repo_rev | egrep -q '^archive'; then
year=$(echo "$repo_rev" | cut -d '/' -f 2 | cut -c1-4)
else
year=$(echo "$repo_rev" | cut -c1-4)
fi
if echo "$repo_rev" | egrep -q '^(latest|2016\.11)$' || \
[ "$(echo "$repo_rev" | cut -c1-4)" -gt 2016 ]; then
[ "$year" -gt 2016 ]; then
_USEAWS=$BS_TRUE
pkg_append="python27"
fi