Skip to content

Commit 4e2b4b6

Browse files
authored
Fix curl endpoint for AL2 python-3.7 download (#1929)
1 parent 661300e commit 4e2b4b6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

eks-distro-base/query_yum_for_python_version.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ AL_TAG="$2"
2323

2424

2525
if [ "$AL_TAG" = "2023" ]; then
26-
MIRROR=$(curl -s https://cdn.amazonlinux.com/al2023/core/mirrors/latest/debuginfo/x86_64/mirror.list)
27-
VERSION=$(curl -s ${MIRROR}repodata/primary.xml.gz | gunzip | sed -rn "s/^.*python${PYTHON_VERSION}-debuginfo-(.*)\-[0-9].amzn.*$/\1/p" | sed '/-/!{s/$/_/}' | sort -V | sed 's/_$//' | tail -1)
26+
MIRROR=$(curl -s https://cdn.amazonlinux.com/al2023/core/mirrors/latest/debuginfo/x86_64/mirror.list | sed 's:/$::')
27+
VERSION=$(curl -sS ${MIRROR}/repodata/primary.xml.gz | gunzip | sed -rn "s/^.*python${PYTHON_VERSION}-debuginfo-(.*)\-[0-9].amzn.*$/\1/p" | sed '/-/!{s/$/_/}' | sort -V | sed 's/_$//' | tail -1)
2828
else
29-
MIRROR=$(curl -s http://amazonlinux.default.amazonaws.com/2/core/latest/debuginfo/x86_64/mirror.list)
30-
VERSION=$(curl -s $MIRROR/repodata/primary.xml.gz | gunzip | sed -rn "s/^.*python3-debuginfo-(.*)\-[0-9].amzn.*$/\1/p" | sed '/-/!{s/$/_/}' | sort -V | sed 's/_$//' | tail -1)
29+
MIRROR=$(curl -s http://amazonlinux.default.amazonaws.com/2/core/latest/debuginfo/x86_64/mirror.list | sed 's:/$::')
30+
VERSION=$(curl -sS $MIRROR/repodata/primary.xml.gz | gunzip | sed -rn "s/^.*python3-debuginfo-(.*)\-[0-9].amzn.*$/\1/p" | sed '/-/!{s/$/_/}' | sort -V | sed 's/_$//' | tail -1)
3131
fi
3232

3333
if [ -f /etc/os-release ] && grep "Amazon Linux 2" /etc/os-release; then

0 commit comments

Comments
 (0)